turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Bachelder" <cho...@chowda.net>
Subject Re: object.save()
Date Sun, 28 Oct 2001 04:10:52 GMT
I'd been using both for quite some time.. why use an arrow when you can use
a nuke right? anyway, I hadn't needed the key back until tonight which is
the only reason this has come to light... in any case, it works with both...
thanks

----- Original Message -----
From: "Scott Eade" <seade@backstagetech.com.au>
To: <turbine-user@jakarta.apache.org>
Sent: Sunday, October 28, 2001 12:09 AM
Subject: Re: object.save()


> It's sort of odd that it lets you do both.  I would have thought setNew()
> would clear the modified flag and setModified() would clear the new flag.
> Then if you invoke save() on a new record with the modified flag set an
> exception ought to be thrown (due to the fact that no key value is set).
>
> I haven't looked at the source, but this would make sense to me.
>
> Scott
>
> ----- Original Message -----
> From: "Dan Bachelder" <chowda@chowda.net>
> To: <turbine-user@jakarta.apache.org>
> Sent: Sunday, October 28, 2001 2:28 PM
> Subject: Re: object.save()
>
>
> > ouch... good call.. why was I doing that? I'm pleading temporary
> insanity...
> >
> >
> >
> > ----- Original Message -----
> > From: "Scott Eade" <seade@backstagetech.com.au>
> > To: <turbine-user@jakarta.apache.org>
> > Sent: Saturday, October 27, 2001 11:24 PM
> > Subject: Re: object.save()
> >
> >
> > > Dan,
> > >
> > > Don't do this:
> > > >                 contact.setModified(true);
> > > and see what happens.
> > >
> > > Scott
> > >
> > > ----- Original Message -----
> > > From: "Dan Bachelder" <chowda@chowda.net>
> > > To: <turbine-user@jakarta.apache.org>
> > > Sent: Sunday, October 28, 2001 2:02 PM
> > > Subject: Re: object.save()
> > >
> > >
> > > > I am not seeing this behavior... after:
> > > >
> > > >                 Contact contact = new Contact();
> > > >                 data.getParameters().setProperties(contact);
> > > >                 contact.setModified(true);
> > > >                 contact.setNew(true);
> > > >                 contact.save();
> > > >                 logDebug("inserted contact with key: " +
> > > > contact.getContactId());
> > > >
> > > > I am seeing null as the key... but I confirm that the data is being
> > > inserted
> > > > into the database with an auto generated key.. this is with the
> > TDK2.1...
> > > I
> > > > see how I can change the OM generation templates to return the key,
> but
> > it
> > > > seems like this must be something someone is doing with the TDK
> > already..
> > > > how are you doing it?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Mime
View raw message