From: Alex L. <lou...@ua...> - 2002-12-30 10:17:30
|
Frank, if I understood you right, you want to map a CMR field with foreign key to a CMP field that is not a primary key. Currently, this is not supported. alex Sunday, December 29, 2002, 3:32:33 PM, you wrote: LF> Hallo Alex, LF> I know you ported this feature not long ago from HEAD to 3.2. LF> I use HEAD here and use this new feature for Bean2, if I understand it LF> right. LF> Column festr.festa_serial is part of the primary key for festr and also LF> foreign key for festr referencing festa.festa_serial. LF> But if the foreign key field is not part of the primary key, like in LF> Bean3 (febdr), the foreign key field must not be CMP-Field in the bean. LF> It's automatically added because of CMR. LF> As said, I would like jboss to recognize that the field already exists LF> also in case of Bean3 and use this field for CMR. LF> Frank LF> 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 ? -- Best regards, Alex Loubyansky |