The same way as non primary key fields.
Jeremy Rempel wrote:
Hi,
In jbosscmp-jdbc.xml how do I map primary key fields to a certain
database field? I can map the regular fields easily.
Thanks, Jeremy
---
This SF.net email is sponsored by: IBM
Hi,
In jbosscmp-jdbc.xml how do I map primary key fields to a certain
database field? I can map the regular fields easily.
Thanks, Jeremy
begin:vcard
fn:Jeremy Rempel
n:Rempel;Jeremy
email;internet:[EMAIL PROTECTED]
tel;work:604-309-0866
x-mozilla-html:FALSE
version:2.1
end:vcard
]
Subject: Re: Re[2]: [JBoss-user] CMP - Primary Key Strategies?
Note that Oracle sequences can't be rollbacked!
If you encounter any Exception (NullPointer...),
there'll be a hole.
Cheers,
WS
--- costin <[EMAIL PROTECTED]> a écrit : > Hi!
>
> So basically you can use
yea right
- Original Message -
From: "costin" <[EMAIL PROTECTED]>
To: "Brijesh Sood" <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 4:06 PM
Subject: Re[2]: [JBoss-user] CMP - Primary Key Strategies?
> Hi!
>
> So basically you can use the au
ve to declare in the deployment descriptor as CMP
> field
>
> BS> Eric this thing is working with mysql for mee ..
> in oracle if ur using sequence as primary key its
> value is integer .. and it will work tooo .
>
> BS> Rgds
>
> BS> Brijesh
>
>
>
in the deployment descriptor as CMP field
BS> Eric this thing is working with mysql for mee .. in oracle if ur using sequence as
primary key its value is integer .. and it will work tooo .
BS> Rgds
BS> Brijesh
BS> - Original Message -----
BS> From: "Eric Tim" <[EMAI
it will work tooo .
Rgds
Brijesh
- Original Message -
From: "Eric Tim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 11:08 AM
Subject: [JBoss-user] CMP - Primary Key Strategies?
> I'm working on a CMP EntityBean with JBoss3 o
18, 2003 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-user] CMP - Primary Key Strategies?
>
>
> Consider a static interface createPrimaryKey() or
> createPrimaryKey(String source) where source is a sequence name in the
> oracle implementation. Use a pooled connection (n
anything goes
wrong you throw away that key. If you're server bounces you throw away
the cached keys, no biggie.
-Original Message-
From: Eric Tim [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2003 9:39 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] CMP - Primary Key Strategies?
On Tuesday, March 18, 2003, at 12:54 AM, Rafal Kedziorski wrote:
hi,
At 23:33 17.03.2003 -0800, Matthew Hixson wrote:
On Monday, March 17, 2003, at 09:38 PM, Eric Tim wrote:
I'm working on a CMP EntityBean with JBoss3 on
Oracle8.
My primary key must be a unique number. Oracle has a
nice facility
hi,
At 23:33 17.03.2003 -0800, Matthew Hixson wrote:
On Monday, March 17, 2003, at 09:38 PM, Eric Tim wrote:
I'm working on a CMP EntityBean with JBoss3 on
Oracle8.
My primary key must be a unique number. Oracle has a
nice facility for handling sequences, which doesn't
seam possible with this sen
On Monday, March 17, 2003, at 09:38 PM, Eric Tim wrote:
I'm working on a CMP EntityBean with JBoss3 on
Oracle8.
My primary key must be a unique number. Oracle has a
nice facility for handling sequences, which doesn't
seam possible with this senerio because i'd need to
write some jdbc code in the e
Sent: Monday, March 17, 2003 9:39 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] CMP - Primary Key Strategies?
>
>
> I'm working on a CMP EntityBean with JBoss3 on
> Oracle8.
>
> My primary key must be a unique number. Oracle has a
> nice facility for handling s
I'm working on a CMP EntityBean with JBoss3 on
Oracle8.
My primary key must be a unique number. Oracle has a
nice facility for handling sequences, which doesn't
seam possible with this senerio because i'd need to
write some jdbc code in the ejbCreate method to get
the nextval.
I'm aware that ther
Hi,
After some time passed on the JBoss forum, I found an article explaining
some
process to manage "automatic primary key generation"
(http://www.theserverside.com/resources/review/ejbpatterns-primarykeystrateg
ies-sept3.zip).
In appendix A.1, there is some code using a sequencer. I found that
I have implemented the primary key pattern described in that (The) Server
Side article.
If anyone would like the source code for this, please email me off-list for
a copy.
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/li
on" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 15, 2001 11:40 AM
Subject: [JBoss-user] cmp primary key
> I'm a newbie for sure, but I've been surfing around for
> a solution to assigning unique primary key values with
> CMPs. I have seen lots
DuplicateKeyException and generate a new key, but I can assure you that
this will not happen often...
Joost.
-Original Message-
From: Frank Morton [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 7:40 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] cmp primary key
I'm a newbie for
- Original Message -
From: "Frank Morton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 16, 2001 12:40 AM
Subject: [JBoss-user] cmp primary key
> I'm a newbie for sure, but I've been surfing around for
> a solution to assigning un
Title: RE: [JBoss-user] cmp primary key
In CMP, in the ejbCreate(), you must generate the key and assign it to the primary key field of your bean.
The strategy of generating the PK depends on your context.
1. If the PK is a string
You can use a UUID generator to generate a key of 32
I'm a newbie for sure, but I've been surfing around for
a solution to assigning unique primary key values with
CMPs. I have seen lots of vague descriptions of how
to do it and some specific ones that are all followed by
other comments from people why that solution doesn't
work.
Does anyone have a
21 matches
Mail list logo