Hi Fedor,
I tried this and is working now, what you said makes sense; in the other
hand there might be some performance hit b/c having to retrieve the object and
then save it again (or probably not since I think Peers should have some nice
caching policy implemented).
I was also confused by the example of update included in the RDF example of
the TDK, since in the example creates a new object instead of reading it from
the DB, when I get some time I will try to make a patch for this..
andres.
Fedor Karpelevitch wrote:
> Peers always update all the fields. It's a different question whether it is
> good or not.
> I think you are trying to create a new object and then do doUpdate with it.
> What you should do instead is you should first retrieve the object using
> doSelect, modify the fields you want and then do Object.save(); this will do
> the trick since the fields you did not change wil be saved with the values
> they were retrieved with.
>
> fedor.
>
> > -----Original Message-----
> > From: Andres Portillo [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, August 13, 2001 10:25 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Torque wants to update all the fields in a table.
> >
> >
> > Hi Fedor,
> >
> > In this case since the row already exists I would expect
> > that if I do not
> > define a value for the field, turbine will only modify the
> > fields that I
> > want.(but maybe is supposed to have a different behavior??)
> > In this case
> > when I'm doing an update (as opposed to an insert) I think the default
> > values should not be used.
> >
> > andres
> >
> > Fedor Karpelevitch wrote:
> >
> > > you need to specify a default value for that field AFAICT.
> > >
> > > fedor.
> > >
> > > > -----Original Message-----
> > > > From: Andres Portillo [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, August 13, 2001 10:02 AM
> > > > To: Turbine-user
> > > > Subject: Torque wants to update all the fields in a table.
> > > >
> > > >
> > > > Hi All,
> > > >
> > > > I'm having a problem with Turbin 2.1 with an Oracle
> > DB. I have a
> > > > table with 5 fields all marked as required. I'm able to
> > do insert and
> > > > delete in the table using the Peer functions doInsert and
> > > > doDelete, but
> > > > the problem is when I try to do an update of just a few fields.
> > > >
> > > > I got an exception saying that I can not do the
> > update because one
> > > > of the fields is NULL. This is the exception:
> > > >
> > > > Stack Trace follows:
> > > > java.lang.reflect.InvocationTargetException:
> > java.sql.SQLException:
> > > > ORA-01407: cannot update ("TEST"."COURSE"."COURSE_CREATION_DATE")
> > > >
> > > > I think Turbine is trying to update all the fields of
> > the row, but
> > > > since I only set values for some of them the DB is
> > > > complaining about it.
> > > > Does somebody knows a fix/workaround for this problem??
> > > >
> > > > andres
> > > >
> > > > PS, BTW I tried to set the
> > "services.LoggingService.sql.level=DEBUG"
> > > > parameter but it doesn't seem to work.. :(
> > > >
> > > > --
> > > > =============================================
> > > > Andres G. Portillo D.
> > > > Software Engineer
> > > > Veratech (www.veratech.com.mx)
> > > > =============================================
> > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> > --
> > =============================================
> > Andres G. Portillo D.
> > Software Engineer
> > Veratech (www.veratech.com.mx)
> > =============================================
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
=============================================
Andres G. Portillo D.
Software Engineer
Veratech (www.veratech.com.mx)
=============================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]