yes.. I just confirmed it...

primary key in DB = 18

getPrimaryKey() == null
getProjectId() == null

I also tried ProjectPeer.doInsert(project);

same thing...



----- Original Message -----
From: "Scott Eade" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Saturday, December 01, 2001 9:02 PM
Subject: Re: peers key problem


> ----- Original Message -----
> From: "Dan Bachelder" <[EMAIL PROTECTED]>
> > I have the following code... after the save (which is successful) I
cannot
> > get back the key (which I know was made and used because I see it in the
> DB)
> > the same results if the primary key method is idbroker or auto_increment
> in
> > the Map file... I am using mysql..
> >
> >                     data.getParameters().setProperties(project);
> >                     project.setStatus("ACTIVE");
> >                     project.setOwnerId(( (
> > LawUser )data.getUser() ).getUserId());
> >                     project.setCreateStamp(new
> > Date(System.currentTimeMillis()));
> >                     project.setNew(true);
> >                     project.save()
> >
> >                     project.getProjectId(); // primary key... always
null
> > after save...
> >
> > I have similar code in other places that seems to work just fine...
> >
>
> Dan,
>
> Have you tried:
>             project.getPrimaryKey();
>
> Cheers,
>
> Scott
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to