Hi,
i'm trying to accomplish the following:
TABLE A, id STRING, ...
TABLE B, id STRING references A.id, ...
TABLE C, id STRING references A.id, ...
...
If i have undestood correctly i have to use a OneToOne relation on A but i'm not able to make B having the counterpart shared_pointer to A since i cannot apparently create a ManyToOne relationship pointing to A sharing the DB field B.id since i'm obtaining a false assertion from the library as soon as i attempt to use the same sKey for id declaration and the relationship (which is accepted if declared before the id, which then throws the same error): ASSERT: "false" in file /usr/local/inl/QxDataMember/QxDataMemberX.inl, line 167
The documentation is really brief on this relationship.
How can i have B.id as a field (QString id) and a QSharedPointer<A> using the same DB column?
Using the partial example of the documentation, how are Author and Person supposed to be written in order to have the Author to appear like a B object (dependant ID) in respect of Person?
How can an Author access the Person obj and how can the Person object access its optional Author object?
EDIT: working with ManyToMany relationships i've been able (i'd like to know if it's supposed to work this way) to create the relevant ManyToOne/OneToMany between the ManyMany extra table and the individual linked entities and i wish you to confirm me this is the way to do this.
This seems possible since the composite primary key allows me to use the field name of each individual column since the PK is reporting its format like col1|col2|col3...
Indeed in that case the introspection engine reports to me each individual column part of the PK as NON PK while the PK is listed as a separate field.
But when i try to accomplish what i asked in the top this goes against the rule which apparently states that the ID cannot be used in a relationship too... I need some help here...
Thanks a lot