Fetching a NextVal to be used in an insert

From: Williams, Beth (beth.william..FIB.ORG)
Date: Mon Nov 01 2004 - 12:18:48 EST

  • Next message: Michael Sacket: "Setting Connection information"

    I am using the "createAndRegisterNewObject()" method from the DataContext to essentially add a new person to our persons objEntity. One of the attributes that is needing to be set is the personId. This field in the database is sequence number, however, there is no trigger setup to automatically generate this number. What I need to do is find out what the next number in the sequence would be (equivalent to running the following query select person_id.NextVal from dual) so that I can use the setPersonId() method and include this value. Can this be done through Cayenne and if so, what would be the best way of doing this? Thanks.

    Beth



    This archive was generated by hypermail 2.0.0 : Mon Nov 01 2004 - 12:18:50 EST