I am playing with the current sources and testing a 1 to many
relationship. I have the following two tables
order with pk: int objectid
and
orderdetail
pk: int order_oid,int line_num
The link..
order_oid=objectid
There is a 1 to many relationship between Order and orderdetail. When
you go to access the collection it tries to look up the orderdetail
lines with order_oid_objectid. In
org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCRelationshipRoleMetaData.java
it always appends the the other side of the relationships field to the
query fieldname. This does not seem right, if there is another field
name that is the forgien key then I should specify it otherwise it
should default to the selected field. I guess you would run into
problems if the key was a composite and you had to match the two up.
Flips through the spec .... Nope the spec only alllows for 1 field to be
the forgein key
As aside I can see the next problem coming. Really this collection
should be loaded ordered by line_num but there is no way to specify this
in the EJB 2.0 spec. (order is not defined) Maybe something for
jbosscmp-jdbc.xml?
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development