Re: Regd Updating Selected Columns

2004-10-14 Thread Ludovic Maitre (POP - Factory Part)
Hello Armin, And thanks for your response, we will try your suggestion soon, seems to be more fast, as you have described. And the code that you give show me some useful utilities methods. Also, we will work on the issue on inheritance on multiple tables. As you can imagine we have also other

Re: Regd Updating Selected Columns

2004-10-12 Thread Thomas Franke
Parvathi Rajaraman wrote: Does anyone know how to update selected columns of a table using OJB. We are using the PersistanceBroker API's store method that will either insert or update all the columns based on the primary key value. But I want to update only a few columns for multiple records based

Re: Regd Updating Selected Columns

2004-10-12 Thread Ludovic Maitre (POP - Factory Part)
Hello, I do this myself, updating only selected foreign keys or relationships (and fetching also). I give the code below, since i appreciate to have some feedback. This rely on modifying the meta datas at runtime, after having set enableChangePerThread (or something like this) to true in the

Re: Regd Updating Selected Columns

2004-10-12 Thread Ludovic Maitre (POP - Factory Part)
The end of the code should be read (commentary before test for null for ord[i] are removed: //restore old state (i hope) for (int i = 0; i ords.length; i++) { if (ords[i] != null) { ords[i].setCascadingStore(state[i][0]);

Re: Regd Updating Selected Columns

2004-10-12 Thread Armin Waibel
Parvathi Rajaraman wrote: Hi, Does anyone know how to update selected columns of a table using OJB. We are using the PersistanceBroker API's store method that will either insert or update all the columns based on the primary key value. But I want to update only a few columns for multiple records

Re: Regd Updating Selected Columns

2004-10-12 Thread Armin Waibel
Hi Ludo, if enableChangePerThread is set true, your workaround should be valid. The only drawback is the DescriptorRepository dr = manager.copyOfGlobalRepository(); call. If you have thousands of objects this method is costly (serialization of the DescriptorRepository instance). Think to