To: Christofer Sandberg
I would like to personally thank you for helping me out. I just got a
chance to give this a look and guess what? IT WORKED!!!!!!!!!!! The
only other things I had to fix were
<table-key-fields> --> <key-fields>
<table-key-field> --> <key-field>
So, now that I have many-to-many relationships working, I can really
make some progress...
Thanks again, this list is really great.
I hope someday to return the favor to somebody else. :-)
gary.
Christofer Sandberg wrote:
>I think the table mapping xml tags are named diffrently and are in another
>structure then the one you supplied assuming you are running JBoss 3.0
>something.
>
>Try replacing the relationships part in your jbosscmp-jdbc.xml with the
>following:
>
><relationships>
> <ejb-relation>
> <ejb-relation-name>Client-Acl</ejb-relation-name>
> <relation-table-mapping>
> <table-name>client_acl</table-name>
> </relation-table-mapping>
> <create-table>false</create-table>
> <remove-table>false</remove-table>
> <ejb-relationship-role>
> <ejb-relationship-role-name>client-has-acls</ejb-relationship-role-name>
> <table-key-fields>
> <table-key-field>
> <field-name>id</field-name>
> <column-name>client_id</column-name>
> </table-key-field>
> </table-key-fields>
> </ejb-relationship-role>
> <ejb-relationship-role>
> <ejb-relationship-role-name>acl-has-clients</ejb-relationship-role-name>
> <table-key-fields>
> <table-key-field>
> <field-name>id</field-name>
> <column-name>acl_id</column-name>
> </table-key-field>
> </table-key-fields>
> </ejb-relationship-role>
> </ejb-relation>
></relationships>
>
>
>/Christofer
>
>On Saturday 08 June 2002 03.02, you wrote:
>
>>I left out the entity bean stuff as it is pretty long. Let me know if you
>>see my problem or if you want to see other files.
>>gary.
>>
>>
>><?xml version="1.0" encoding="UTF-8"?>
>>
>><!-- =====================================================================
>>--> <!--
>> --> <!-- Standard JBossCMP-JDBC Configuration
>> --> <!--
>> --> <!--
>>===================================================================== -->
>>
>><!-- $Id: jbosscmp-jdbc.xml,v 1.1 2002/04/07 06:22:31 gary Exp $ -->
>>
>><jbosscmp-jdbc>
>> <defaults>
>> <datasource>java:/ISG_DS</datasource>
>> <type-mapping>PostgreSQL</type-mapping>
>> <debug>true</debug>
>> <create-table>false</create-table>
>> <remove-table>false</remove-table>
>> <read-only>false</read-only>
>> <time-out>300</time-out>
>> <pk-constraint>true</pk-constraint>
>> <fk-constraint>false</fk-constraint>
>> <row-locking>false</row-locking>
>> <select-for-update>false</select-for-update>
>> <relation-mapping-style>foreign-key</relation-mapping-style>
>> <read-ahead>
>> <strategy>on-load</strategy>
>> <page-size>1000</page-size>
>> <eager-load-group>*</eager-load-group>
>> </read-ahead>
>> <list-cache-max>1000</list-cache-max>
>> <alias-header-prefix>t</alias-header-prefix>
>> </defaults>
>> <relationships>
>> <ejb-relation>
>> <ejb-relation-name>Client-Acl</ejb-relation-name>
>> <table-mapping>
>> <table-name>client_acl</table-name>
>> <create-table>false</create-table>
>> <remove-table>false</remove-table>
>> <ejb-relationship-role>
>>
><ejb-relationship-role-name>client-has-acls</ejb-relationship-role-nam
>>e> <table-key-fields>
>> <table-key-field>
>> <field-name>id</field-name>
>>
><column-name>client_id</column-name>
>> </table-key-field>
>> </table-key-fields>
>> </ejb-relationship-role>
>> <ejb-relationship-role>
>>
><ejb-relationship-role-name>acl-has-clients</ejb-relationship-role-nam
>>e> <table-key-fields>
>> <table-key-field>
>> <field-name>id</field-name>
>>
><column-name>acl_id</column-name>
>> </table-key-field>
>> </table-key-fields>
>> </ejb-relationship-role>
>> </table-mapping>
>> </ejb-relation>
>> </relationships>
>></jbosscmp-jdbc>
>>
>>Arthur Wang wrote:
>>
>>>please post your many-to-many relationship defination in
>>>jbosscmp-jdbc.xml.
>>>
>>>-----Original Message-----
>>>
>>From: Gary S. Cuozzo [mailto:[EMAIL PROTECTED]]
>>
>>>Sent: Friday, June 07, 2002 5:21 PM
>>>To: [EMAIL PROTECTED]
>>>Subject: Re: [JBoss-user] Auto created relationship table name.
>>>
>>>
>>>This seems similar to the problem that I am seeing. I am not
>>>auto-creating the table, but instead have an existing table that I want
>>>to use.
>>>
>>>When I try to use my many-to-many relationship, I get exceptions because
>>>the table (that jboss is trying to use) doesn't exist. I have no idea
>>>what I am doing wrong, but am looking at the recently posted cmr-example
>>>right now.
>>>
>>>Currently, I have never gotten a table-mapped relationship to work.
>>>
>>>Anybody seen this problem & fixed it? I actually posted a report a few
>>>nights ago, but did not get any responses.
>>>
>>>I'll be sure to let you know if/when I figure this out.
>>>
>>>gary.
>>>
>>>Arthur Wang wrote:
>>>
>>>>I set create-table as true in my jbosscmp-jdbc.xml, so the jboss will
>>>>
>>>create
>>>
>>>>table for me, but the name of relation table created is like 'A-Bs-B-As",
>>>>
>>>it
>>>
>>>>is not the name I specified in relation-table-mapping of
>>>>jbosscmp-jdbc.xml.
>>>>
>>>>-----Original Message-----
>>>>From: Dain Sundstrom [mailto:[EMAIL PROTECTED]]
>>>>Sent: Friday, June 07, 2002 4:27 PM
>>>>To: [EMAIL PROTECTED]
>>>>Subject: Re: [JBoss-user] Auto created relationship table name.
>>>>
>>>>Arthur Wang wrote:
>>>>
>>>>>Hi ,
>>>>>
>>>>>I have a many to many relationship betwen two beans, and I specify the
>>>>>relation table in the ejb-jar.xml file, but when set the create-table as
>>>>>true in jbosscmp-jdbc.xml, the created relation table has a different
>>>>>name as the one I specified in the relationship defination, this should
>>>>>not be
>>>>>
>>>>a
>>>>
>>>>>problem if I use existing table, but in this case(create table when
>>>>>
>>>>deploy),
>>>>
>>>>>many to many relationship may not working. Any idea on it?
>>>>>
>>>>I don't understand you. Can you be more specific?
>>>>
>>>>-dain
>>>>
>>>>
>>>>
>>>>_______________________________________________________________
>>>>
>>>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>>>August 25-28 in Las Vegas -
>>>>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>>>>
>>>>_______________________________________________
>>>>JBoss-user mailing list
>>>>[EMAIL PROTECTED]
>>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>>
>>>>_______________________________________________________________
>>>>
>>>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>>>August 25-28 in Las Vegas -
>>>>
>>>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>>>
>>>>_______________________________________________
>>>>JBoss-user mailing list
>>>>[EMAIL PROTECTED]
>>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>>
>>>_______________________________________________________________
>>>
>>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>>August 25-28 in Las Vegas -
>>>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>>>
>>>_______________________________________________
>>>JBoss-user mailing list
>>>[EMAIL PROTECTED]
>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>
>>>_______________________________________________________________
>>>
>>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>>August 25-28 in Las Vegas -
>>>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>>>
>>>_______________________________________________
>>>JBoss-user mailing list
>>>[EMAIL PROTECTED]
>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>
>>_______________________________________________________________
>>
>>Don't miss the 2002 Sprint PCS Application Developer's Conference
>>August 25-28 in Las Vegas -
>>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>>
>>_______________________________________________
>>JBoss-user mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>
>_______________________________________________________________
>
>Don't miss the 2002 Sprint PCS Application Developer's Conference
>August 25-28 in Las Vegas -
>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________________________
Multimillion Dollar Computer Inventory
Live Webcast Auctions Thru Aug. 2002 - http://www.cowanalexander.com/calendar
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user