Imagine an MKObject that references several objects of
the same klass and this class wants to list these
Person (personId) in SQL
toDo -> list of Task
askedFor -> list of Task
reportsFrom -> list of Task
assignedTo -> Person
assignedBy -> Person
reportTo -> Person
The current classes SQLPythonGenerator and
PythonGenerator can only handle a single ObjRef per
klass (one Person attribute that has to be named
person, beeing referenced in the tables personId)
So I introduced a new model attribute 'whereCol' to
the "Extra" column of foo.mkmodel/Classes.cvs that
tells a "list of Task" what foreign key to look for.
,toDo,0,list of Task,,,"whereCol='assignedTo'"
,askedFor,0,list of Task,,,"whereCol='assignedTo'"
,reportsFrom,0,list of Task,,,"whereCol='assignedTo'"
If your model does not need this, just stay with
person and personId as default behavior.
- What do you think about this ?
- Is it worth to go to the MiddleKit CVS ?
- What is the best name ? whereCol, foreignKey, ????
PIXEL PARTNER (R)
mobile +44 7960 384334
Gesendet von Yahoo! Mail
Get latest updates about Open Source Projects, Conferences and News.