Sorry, Thomas, maybe I wasn't clear enough in my question. I need to update
both - in one case - all fields, in another - just some fields.
So, modifying ClassDescriptor to accept only particular fields will help
only with one case...

For now, according to Christophe Marcout, the only way to accomplish my task
is to get an Object from DB with a
getObjectByQuery() method call first, then set any of updates I want.

So, to make  this "universal" update - I need 2 steps - 2 database calls -
Select Object - Store Object.
With SQL language, as we know,  there's just one DB call for Update.
Is this way really the only way to make update with OJB?

Best regards,
Mykola


----- Original Message ----- 
From: "Thomas Mahler" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Sunday, June 29, 2003 5:13 AM
Subject: Re: Update only some fields in DB


> Hi
>
> Mykola Ostapchuk wrote:
> > Hello,
> >
> > This question already was in this maillist, but nobody answered.
>
> I answered it on 19.6.:
>
> You can modify the ClassDescriptor of your peristent class to only
> contain FieldDescriptors of the the PK and modified field.
>
> OJB will then only work with those two columns!
>
> cheers,
> Thomas
>
> > It's actually so fundamental in use, that it must be somewhere in FAQ.
> >
> > So, here it is: How can I update not all, but only some fields in some
> > table? I'm using PersistenceBroker.store method to persist an object -
and
> > if I don't populate all the object properties with values, I get null
rows
> > in DB in place of unspecified object properties...
> > At least, please, answer if it's possible with OJB.
> >
> >
> > Best regards,
> > Mykola Ostapchuk
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>


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

Reply via email to