foreign key column when relationshipRole is not targetMany
[email protected] Thu, 18 Nov 2004 16:12:24 +0100
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <OF9F8605B7.E62BBD76-ONC1256F50.00520F99-C1256F50.0053832C@arsoe.pl> |
Is somebody known how finding the foreign key columns when
relationshipRole is not targetMany?
I try to do
#foreach($fkey in $target.getPrimaryKeyColumns())
${fkey.sqlName.toLowerCase()}")
#end
where target is the relationshipRole one.
Of course it is not correct as if there is 2 attributes of the same classe
they will have the same FK.
I find how to do this with targetMany by using the ColumnMaps attribute of the RelationshipRole object but when the relation
is not targetMany the list is empty.
Nicolas
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8