postgresql: fully qualified table names are causing me heartache.

postgresql: fully qualified table names are causing me heartache.

skidudeskidude Posts: 6Questions: 3Answers: 0

Hi All:

I have been working to build a data table that exposes my parent table which is ENTITY in postgresql.
Beyond that, I am using PHP / Mjoin in order to create a relationship with a child table which is called TOUCHES.

The snippet pasted in below does what I want.

HOWEVER: I seek a better way, a way that allows me to use the fully qualified table/column names, which are:

contactschema.entity.entity_key
contactschema.touches.parent_entity_key

At issue is the apparent limitation that Mjoin (link) does not like my fully qualified names, having as they do, two dots each.

To this point I have found only an ugly workaround: I had to alter my user in the database such that he has a hard coded search_path. (this is akin to declaring a default schema name).

Does anyone know of a better syntax or a better solution?

->join(
Mjoin::inst( 'touches' )
->link( 'entity.entity_key', 'touches.parent_entity_key' )
->fields(
Field::inst( 'parent_entity_key' )
)
)
->process( $_POST )
->json();

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,055Questions: 1Answers: 10,173 Site admin
    Answer ✓

    Good to hear that you have a workaround. I'm afraid that this is a limitation of the Editor server-side libraries at the moment. Better support for schemas is something I plan to introduce in future.

    Allan

This discussion has been closed.