Imagine an MKObject that references several objects of
the same klass and this class wants to list these
references. Example:
Person (personId) in SQL
toDo -> list of Task
askedFor -> list of Task
reportsFrom -> list of Task
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.
iE.
,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, ????
=====
kind regards,
Thomas Kumlehn
PIXEL PARTNER (R)
mobile +44 7960 384334
__________________________________________________________________
Gesendet von Yahoo! Mail
http://mail.yahoo.de
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss