hi,

I tried to look through the archive on the web and on the mailing list to
find similar questions, but no result. Is it me or does
http://nagoya.apache.org/eyebrowse/SummarizeList?listId=107 only produce
empty pages in the end?

Anyway, I have a few questions - they might have been asked before, excusez.

Question 1 :Unexpected deletes, OJB 0.9.7 :
------------------------------------------------------------
Using ODMG or the Persistencebroker, when adding an element  to a java
Collection that is an attribute of another object,  you will first see a
delete (!) of all the collection elements in the database and then a
re-insertion of them all including the new one.
For instance, if an Order object had six Line items and you add a seventh
and make it persisten using store(), first the  six are deleted and then all
seven are added.

Is this a bug or a feature? Can it be avoided?


Question 2: Primary key violation handling, OJB 0.9.7 :
------------------------------------------------------------
Normally when you insert a row and the primary key already exists in that
table you get a db exception. OJB however replaces the insert with an
update - to me unexpected behaviour, unwanted in my case.

Could I avoid this from happening ?



QUestion 3: Transaction and cache
------------------------------------------------------------

I have taken an code snapshot that works :


   odmg = OJB.getInstance();
   db = odmg.newDatabase();
   db.open("repository.xml", Database.OPEN_READ_WRITE);

   tx = odmg.newTransaction();
   tx.begin();
   deleteTestData();
   tx.commit();

   tx = odmg.newTransaction();
   tx.begin();
   createTestData();
   tx.commit();

   loopAndPrintTestSet();


Hope it's clear what the code does without showing the details. It's
straightforward.


But the next piece of code will fail; if you run it twice starting with an
empty test set, the first time it's all right but the second time nothing is
created in the persistence layer, an Oracle database. From a DB point of
view the code is legitimate and should not produce any different results.
It seems to me that the cache gets messy when doing 'DML', and only a commit
clears up. Is this a known problem ?

   odmg = OJB.getInstance();
   db = odmg.newDatabase();

   db.open("repository.xml", Database.OPEN_READ_WRITE);

   tx = odmg.newTransaction();
   tx.begin();
   deleteTestData();
   //tx.commit();

   //tx = odmg.newTransaction();
   //tx.begin();
   createTestData();
   tx.commit();

   loopAndPrintTestSet();




Kind regards and thanks to anyone helping out !

Mark.
[EMAIL PROTECTED]


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

Reply via email to