[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    Re[4]: [JBoss-user] Question about CMP/CMR
From:       Alex Loubyansky <loubyansky () ua ! fm>
Date:       2002-12-30 14:28:32
[Download RAW message or body]

Monday, December 30, 2002, 3:50:11 PM, you wrote:

PK> Are there any plans to support it?

Yes.

alex

PK> It would solve many problems (especially performance and lock problems
PK> in my application)

PK> -----Original Message-----
PK> From: Alex Loubyansky [mailto:loubyansky@ua.fm] 
PK> Sent: Monday, December 30, 2002 12:19 PM
PK> To: Langelage, Frank
PK> Subject: Re[2]: [JBoss-user] Question about CMP/CMR


PK> Frank,

PK> if I understood you right, you want to map a CMR field with foreign key
PK> to a CMP field that is not a primary key. Currently, this is not
PK> supported.

PK> alex

PK> 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 
LF>> it
LF>> right.
LF>> Column festr.festa_serial is part of the primary key for festr and
PK> 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
PK> bean. 
LF>> It's automatically added because of CMR.

LF>> As said, I would like jboss to recognize that the field already 
LF>> 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 -> 
>>>LF> 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.
PK> 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
PK> there as a 
>>>LF> CMP-Field in both cases.
>>>
>>>LF> So my question: Is this a Bug, a FeatureRequest or a must be which

>>>LF> will
>>>LF> not be changed ?

-- 
Best regards,
 Alex Loubyansky




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

Configure | About | News | Add a list | Sponsored by KoreLogic