[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key is also Primary Key

2004-06-20 Thread loubyansky
Yes, you can. First, get familiar with ejb-jar.xml and mapping in jbosscmp-jdbc.xml. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3839349#3839349 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3839349

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key is also Primary Key

2004-06-19 Thread loubyansky
| cmr-field | cmr-field-nameuserid/cmr-field-name | cmr-field-typejava.lang.String/cmr-field-type | /cmr-field | This is not going to work. A field can't be both CMP and CMR at the same time. And from ejb-jar_2_0.dtd | !-- | The cmr-field-type element specifies the class of a

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key is also Primary Key

2004-06-19 Thread madadi
hai.. Is it possible that i can use userid as a Primarykey for one table and Foreign key for other table. because i have a one registration form which contains personal data and specific data. but both should store in 2 different table. in my database i declared user id as a Primarykey for

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key is also Primary Key

2004-06-18 Thread loubyansky
Could you post the ejbCreate implementation, stacktrace and DDs? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3839181#3839181 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3839181

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key is also Primary Key

2004-06-18 Thread madadi
Dear Alexey Loubyansky, I too having same problem actually i thought that i solved but it works due to i created another primary key in second table. userid is Primary key for One table and Foreign Key for 2nd table.I created the one more Primary key in second table(sem) than i can store

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign key as a Primary Key

2004-04-01 Thread thepriz
Here is a Primary Key related to a Foriegn key relation in a one to one relation. | /*** | * * | * JBoss: The OpenSource J2EE WebOS * | * * | * Distributable under LGPL

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign key as a Primary Key

2004-03-29 Thread loubyansky
This is done by mapping foreign key fields to primary key columns. Your example is incorrect as it declares CMR fields as primary keys. Only CMP fields can be primary keys. a href=http://www.jboss.org/index.html?module=bbop=viewtopicp=3827846#3827846;View the original post/a a

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key within Composite Primary Key and CMR

2004-02-29 Thread mikea-xoba
what i mean is: if the CMR field (called 'foo') which is being mapped to the same database column as a CMP field which is part of the primary key, then doing a setFoo() on that CMR field would in effect be changing the primary key too, which is a no-no. thus, i would not expose that setFoo()

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key within Composite Primary Key and CMR

2004-02-29 Thread loubyansky
yes View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3823544#3823544 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3823544 --- SF.Net is sponsored by: Speed Start Your

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key within Composite Primary Key and CMR

2004-02-28 Thread mikea-xoba
if i understand your discussion, i believe i may be having a similar problem which i'm trying to tackle at the moment, which is basically the question: can a CMR field be part of a CMP primary key? and if so, how does one do it? i'm also wondering if xdoclet would do it properly, if it's

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key within Composite Primary Key and CMR

2004-02-28 Thread loubyansky
can a CMR field be part of a CMP primary key? How do you imagine that? If you mean whether you can use the same columns for CMP fields and for foreign key fields the CMR is mapped to, then the answer is yes, you can. View the original post :

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key within Composite Primary Key and CMR

2004-02-28 Thread mikea-xoba
i think i see the point --- CMP's must be set in the entity bean's ejbCreate method, which returns the primary key. and CMR's must be set in the beans ejbPostCreate method, which is called after creation. thus, the CMR fields formally can *not* be part of the primary key (correct me if i'm

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key within Composite Primary Key and CMR

2004-02-28 Thread loubyansky
that's correct. Except for exposing CMR setter (?) what do you mean? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3823427#3823427 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3823427

[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign Key within Composite Primary Key and CMR

2004-02-23 Thread devilbot
Hi Chris, Would you please mail me those related xml files? Many thanks to your help. my email address: [EMAIL PROTECTED] Best regards, Austin View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822631#3822631 Reply to the post :