Re: something not working as I expect it to

2003-03-31 Thread Armin Waibel
Hi Brill,

could you post some more info, more
stack trace?
If you run OJB in 2-tier app, you could use
SequenceManagerInMemoryImpl for testing.
Does this solve your problem?

regards,
Armin

- Original Message -
From: Brill Pappin [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 7:51 AM
Subject: Re: something not working as I expect it to


 Thanks for the info.

 I change the default values, and am now getting:
 ERROR: Can not get next
org.apache.ojb.broker.util.sequence.HighLowSequence
 for next scope of keys null

 in my tests... any ideas?

 - Brill Pappin

 - Original Message -
 From: Lance Eason [EMAIL PROTECTED]
 To: OJB Users List [EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 12:22 AM
 Subject: RE: something not working as I expect it to


 OJB looks for a value of 0.  If the id value is 0 and it is set to
 auto-increment then OJB will generate a value for it.  I ran into the
same
 thing myself not to long ago.

 -Original Message-
 From: Brill Pappin [mailto:[EMAIL PROTECTED]
 Sent: Sunday, March 30, 2003 11:00 PM
 To: OJB Users List
 Subject: something not working as I expect it to


 I have a fairly simple object, who's ID I need to access.

 in my descriptor for the object, I have the id field set to
auto-increment
 and as a primary key.

 In the class, the id is initialized to -1 (All my classes, in all my
 libraries initialize all instance members, even if only to null. this
is
 part of our standards and good programming practice in general).

 What I am expecting, is that because I've set the id to auto-increment
in
 the descriptor, that when I create a new class, the ID is auto
generated...
 however what I get is the default value of the new object (-1 in this
case).
 Can I force ID's for a particular object to always be generated by the
 database?

 If not, what is the recommended way to force that generation?

 I need the ID's because I'm working in a web environment and the id's
are
 often called from remote applications... not to mention legacy
data/apps ;)
 So, I need the ID field, but I also want the system to generate it for
new
 objects.

 - Brill Pappin



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



something not working as I expect it to

2003-03-30 Thread Brill Pappin
I have a fairly simple object, who's ID I need to access.

in my descriptor for the object, I have the id field set to auto-increment
and as a primary key.

In the class, the id is initialized to -1 (All my classes, in all my
libraries initialize all instance members, even if only to null. this is
part of our standards and good programming practice in general).

What I am expecting, is that because I've set the id to auto-increment in
the descriptor, that when I create a new class, the ID is auto generated...
however what I get is the default value of the new object (-1 in this case).
Can I force ID's for a particular object to always be generated by the
database?

If not, what is the recommended way to force that generation?

I need the ID's because I'm working in a web environment and the id's are
often called from remote applications... not to mention legacy data/apps ;)
So, I need the ID field, but I also want the system to generate it for new
objects.

- Brill Pappin



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: something not working as I expect it to

2003-03-30 Thread Brill Pappin
Thanks for the info.

I change the default values, and am now getting:
ERROR: Can not get next org.apache.ojb.broker.util.sequence.HighLowSequence
for next scope of keys null

in my tests... any ideas?

- Brill Pappin

- Original Message -
From: Lance Eason [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 12:22 AM
Subject: RE: something not working as I expect it to


OJB looks for a value of 0.  If the id value is 0 and it is set to
auto-increment then OJB will generate a value for it.  I ran into the same
thing myself not to long ago.

-Original Message-
From: Brill Pappin [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 11:00 PM
To: OJB Users List
Subject: something not working as I expect it to


I have a fairly simple object, who's ID I need to access.

in my descriptor for the object, I have the id field set to auto-increment
and as a primary key.

In the class, the id is initialized to -1 (All my classes, in all my
libraries initialize all instance members, even if only to null. this is
part of our standards and good programming practice in general).

What I am expecting, is that because I've set the id to auto-increment in
the descriptor, that when I create a new class, the ID is auto generated...
however what I get is the default value of the new object (-1 in this case).
Can I force ID's for a particular object to always be generated by the
database?

If not, what is the recommended way to force that generation?

I need the ID's because I'm working in a web environment and the id's are
often called from remote applications... not to mention legacy data/apps ;)
So, I need the ID field, but I also want the system to generate it for new
objects.

- Brill Pappin



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]