I'm not letting torque generate the id's for my data.  the user enters them
into the web form, but that's another issue.

i tried your suggestion, but the insert returned a null objectKey record.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 8:44 AM
> To: [EMAIL PROTECTED]
> Subject: RE: getting newly inserted object
> 
> 
> Probably because you cirtiera doesn't match any longer because of the
> objectKey changing.
> 
> Do instead something like this
> 
> product = ProduuctIdPeer.retrieveByPK(objectKey)
> 
> Eric
> 
> -----Original Message-----
> From: Mark Lybarger [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 8:39 AM
> To: Turbine Users List (E-mail)
> Subject: getting newly inserted object
> 
> 
> I'm having troubles selecting an object after I insert it.  The
> productAddList in the below code is an empty list after 
> executing the code.
> The doInsert method executes ok, and I can see the record is 
> inserted, but
> the select doesn't seem to be returning it.
> 
>         try 
>         {
>               ObjectKey objectKey = ProductIdPeer.doInsert( 
> criteria );
> 
>               productAddList = ProductIdPeer.doSelect( criteria );
> 
>         } catch ( Exception e)
>         {
>               context.put("exceptionMessage", e.getMessage());
>         }
> 
> Any ideas why this isn't returning me the record?  I'd like 
> to be able to
> use the record that was just added on the next page.
> 
> 
> Mark Lybarger
> [EMAIL PROTECTED]
> CBC Companies
> 614.442.3741
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
>  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
 

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

Reply via email to