Hallo Alex,

I know you ported this feature not long ago from HEAD to 3.2.

I use HEAD here and use this new feature for Bean2, if I understand it right.
Column festr.festa_serial is part of the primary key for festr and also foreign key for festr referencing festa.festa_serial.

But if the foreign key field is not part of the primary key, like in Bean3 (febdr), the foreign key field must not be CMP-Field in the bean. It's automatically added because of CMR.

As said, I would like jboss to recognize that the field already exists also in case of Bean3 and use this field for CMR.


Frank


Alex Loubyansky wrote:

Hello Frank,

in JBoss-3.2 (cvs version) you can map foreign key fields to primary
key fields. This is done by specifying the same column names for
foreign and primary key fields.

alex

Saturday, December 28, 2002, 9:12:26 PM, you wrote:

LF> JBoss-Head, JDK 1.4.1, Informix-DB

LF> Following given situation:
LF> Bean 1:
LF> Name=Festa, DBTable=festa, PK=festa_serial
LF> Bean 2:
LF> Name=Festr, DBTable=festr, PK=festa_serial+festr_pos_nr, FK=festa_serial ->> festa
LF> Bean 3:
LF> Name=febdr, DBTable=febdr, PK=febdr_serial, FK=festa_serial -> festa

LF> As you can see, for bean 2 the CMR-Field festa_serial must be a LF> CMP-Field, because it's part of the PK.
LF> For bean 3 the CMR-Field festa_serial must not be a CMP-Field. Otherwise LF> you get a DeploymentException because of a "wrong" LF> SQL-CreateTable-Statement.
LF> The field festa_serial is mentioned twice here.
LF> I would like JBoss to recognize that the CMR-Field is already there as a LF> CMP-Field in both cases.

LF> So my question: Is this a Bug, a FeatureRequest or a must be which will LF> not be changed ?




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to