Bugs item #675932, was opened at 2003-01-28 08:15
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=675932&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Moi (vincent_aumont)
>Assigned to: Alexey Loubyansky (loubyansky)
Summary: CMR is also a PK: none of the  CMR columns are created

Initial Comment:
Pre-3.2, when one of the cmr fields (in a one-to-
many relationship) was a PK field of the many-
bean, the cmr field was duplicated in the many-
bean table.
I compiled 3.2.0RC2 from CVS this morning and the 
behaviour is different but the problem has not been 
fixed. Now, none of the cmr fields are added to the 
many-bean table when one of the cmr field is also 
a PK in the many-bean.

To be more concrete:  

Bean1 (PK = context + name)
-context
-name
-description


Bean2 (PK = context + ID)
-context
-ID
-quantity


I have a one-to-many relationship between both 
beans (Bean1 has many Bean2).

I declare the cmr fields as follow:
<key-field>
<field-name>context</field-name>
<column-name>context</column-name> 
</key-field>
<key-field>
<field-name>name</field-name>
<column-name>Bean1_Name</column-name>
</key-field>

The context column is not duplicated in the Bean2 
table, which is what we want (in pre-3.2 we would 
have ended up with two 'context' columns in the 
bean2 table). The problem is that the Bean1_Name 
column is not added either.

If I change the declaration as follow:

<key-field>
<field-name>context</field-name>
<column-name>context_foo</column-name> 
</key-field>
<key-field>
<field-name>name</field-name>
<column-name>Bean1_Name</column-name>
</key-field>

Both columns are added the the Bean2 table.


Environment: 
jboss 3.2.0RC2
NT
HSQL
Sun jdk 1.3.1_03


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=675932&group_id=22866


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to