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
| 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
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
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
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
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
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
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()
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
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
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 :
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
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
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 :
14 matches
Mail list logo