Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a relation between entities #28

Open
benatspo opened this issue Jan 24, 2020 · 7 comments
Open

Create a relation between entities #28

benatspo opened this issue Jan 24, 2020 · 7 comments
Assignees
Labels
ddl Related to the DDL/Evolution operators

Comments

@benatspo
Copy link

Hi,

It is actually impossible to create a relation between two entities, except if those entities are both in a document database, or if the source entity is in a document database.
Actually, the only solution to create a physical relation between two entities in a relational database, is to add the relation in the ML schema, and reset the databases.

Thank you for the correction

@benatspo
Copy link
Author

benatspo commented Jan 29, 2020

Here is a complete example.

  1. Source model before the creation of a new relation (relation name: "user", relation cardinality: "one", relation source entity: "Address"):
    see "source.log" attached file.

  2. Uploaded model (containing the relation in the ML model) before the creation of a new relation:
    see "target.log" attached file.

  3. QL queries to add the corresponding relation to the corresponding entity (add "user" relation to "Address" entity):
    create Address.user -> User[1..1]

-> This last query returns an error.
Speaking with Davy, two problems:

  • Impossible to create a relation dynamically without "resetdatabases" web service call
  • Impossible to create a relation between two relational database entities, as the create relation query does not create the join table dynamically. Such an operation is actually working between two document database entities, or from a document database entity to a relational database entity.

Thank you for your help

@benatspo
Copy link
Author

source.log
target.log

@DavyLandman
Copy link
Contributor

Hi @benatspo,

Am I correct that this is a bug in our DDL implementation?

@benatspo
Copy link
Author

benatspo commented Mar 3, 2020

Hi Davy,

Yes, probably.
My objective is just to create a relation between two relational database entities, dynamically, using the web service, with a "/api/update" query, plus a TQL query in body.
Such a query returned an error.

Speaking with you previously, it could be a problem with the creation of the join table between those entities?

Thank you

@DavyLandman
Copy link
Contributor

I'll put it as a bug, I'll ping you when we switch to new backend, to see if that fixes it.

@DavyLandman DavyLandman added this to the ⛵ Final Release milestone Mar 3, 2020
@DavyLandman DavyLandman added the ddl Related to the DDL/Evolution operators label Mar 3, 2020
@benatspo
Copy link
Author

benatspo commented Mar 3, 2020

Ok thanks :)

@tvdstorm
Copy link
Contributor

tvdstorm commented Feb 2, 2021

@benatspo is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ddl Related to the DDL/Evolution operators
Projects
None yet
Development

No branches or pull requests

4 participants