Nope, in addition to the JBoss restriction (NO FK can also be PK) is another restriction: foreign key columns participating in CMRs can't have a NOT NULL constraint in the DB. Since my DBA wouldn't allow me to disable those constraints I had to implement the relationships the hard way (similarly to what you mentioned). The first restriction might be fixed in JBoss 3.2 or JBoss Head from CVS (which is Jboss 4 alpha). Try that..otherwise and for the NOT NULL bug we'll probably have to wait until this is fixed in JBoss.
Bernie -----Ursprüngliche Nachricht----- Von: Jon Finanger [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 11. Dezember 2002 13:21 An: [EMAIL PROTECTED] Betreff: [Middlegen-user] Foreign key as/in primary key Hi! I've seen that this has been a hot topic in lists around. I have the same problem as the rest, to use a foreign key as part of primarykey in jboss. The ejb spec is talking about one to one relationships; wouldn't such relationship neccesary involve a pk on one side and a foreignkey as pk on the other side? (unless we have a unique index on the field). I've seen a suggestion on solution somewhere; Let the pk/fk field be a pk; set the pk using the fk object in ejbcreate; write a ejbselect (or finder) that returns the fk. Any other workaround to fool jboss regarding foeignkeys within a primarykey? -Jon [middlegen] (entitybean.Server ? ) WARNING (cmp20): The table zonesequenceitems has a primary key where the following columns also are forei gn keys: zoneid. Having set fkcmp="false" this will most likely cause problems at run time because those columns will not be persisted, and therefore new instances will not set the key fields that correspond to foreign keys. The database might choke on this. ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user