Bugs item #760165, was opened at 2003-06-25 02:57
Message generated for change (Comment added) made by loubyansky
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=760165&group_id=22866
Category: JBossCMP
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: louis (l7leungsun)
>Assigned to: Alexey Loubyansky (loubyansky)
Summary: CMR w/ incorrect sql
Initial Comment:
My application has a 1 to many CMR (i.e. one being a
purchase order ,
and many being line items). I don't think i've specified
the column
mapping for this relationship wrong. JBoss should be
firing "Select
MASTERORDER ..." sql when retreiving info about this
relation. But
instead, it fired "Select MASTERORDER_ORDERID ...". I
have no idea why
did it appended the _ORDERID at the end. Here is a
snippet of the
relation mapping xml in jbosscmp-jdbc.xml:
<!-- Relationships -->
<relationships>
<ejb-relation>
<ejb-relation-name>PurchaseOrderBean-lineItems-
masterOrder-LineItemBean</ejb-relation-name>
<foreign-key-mapping/>
<ejb-relationship-role>
<ejb-relationship-role-name>PurchaseOrderBean-
lineItems-LineItemBean</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>orderId</field-name>
<column-
name>MASTERORDER</column-name>
</key-field>
</key-fields>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>LineItemBean-masterOrder-
PurchaseOrderBean</ejb-relationship-role-name>
</ejb-relationship-role>
</ejb-relation>
</relationships>
----------------------------------------------------------------------
>Comment By: Alexey Loubyansky (loubyansky)
Date: 2003-07-04 14:39
Message:
Logged In: YES
user_id=543482
I don't see too. Could you let JBoss to generate the schema
and see what will happen?
alex
----------------------------------------------------------------------
Comment By: louis (l7leungsun)
Date: 2003-06-27 01:01
Message:
Logged In: YES
user_id=808812
I've also attached my database population script and
jbosscmp-jdbc.xml. I don't see any problems with both.
----------------------------------------------------------------------
Comment By: Alexey Loubyansky (loubyansky)
Date: 2003-06-26 08:54
Message:
Logged In: YES
user_id=543482
Please, make sure the database schema and mapping in
jbosscmp-jdbc.xml are congruent (since, tables are not
generated by JBossCMP). I guess, it is not a JBoss problem.
alex
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=760165&group_id=22866
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development