retrieving sequence number in Glorp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

retrieving sequence number in Glorp

oystein
Hi

I want to save an object to the database, and then retrieve the autogenerated sequence number. When i say: inUnitsOfWorkDo: [session register: myObject], the sequence nr is automatically updated, and myObject is stored with this id. Im using Oracle, and postgres for testing.

so, how can i get Glorp to return the sequence nr to smalltalk? Im using visualworks.

Reply | Threaded
Open this post in threaded view
|

Re: retrieving sequence number in Glorp

Wallen, David
I think if you send object>>id, you should see the newly assigned
sequence value. If that's not working, a full code snippet might help
the group figure out what's going wrong.

-Dave

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of oystein
Sent: Thursday, June 30, 2011 4:23 AM
To: [hidden email]
Subject: [vwnc] retrieving sequence number in Glorp

Hi

I want to save an object to the database, and then retrieve the
autogenerated sequence number. When i say: inUnitsOfWorkDo: [session
register: myObject], the sequence nr is automatically updated, and
myObject
is stored with this id. Im using Oracle, and postgres for testing.

so, how can i get Glorp to return the sequence nr to smalltalk? Im using
visualworks.



--
View this message in context:
http://forum.world.st/retrieving-sequence-number-in-Glorp-tp3635380p3635
380.html
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: retrieving sequence number in Glorp

oystein
Thanks!

That seemed to do the trick.