|
We are developing an integration between two systems using
Castor(0.9.4.1). We were working in this way since 3 years. We have three objects, two dependent from one. (A,B,C). A is the master and B and C depends on A. We have applied a uniquess contraint in the tables(Oracle 9.2.0.1) of the objects B(tableB) and C(tableC). We use the system like an order (A) and a group of parameters (B,C). The number of parameters, could change from one interaction in the database to another, so we have chosen the option of delete the vector B and C and generate it again. Without the constraints it works ok, but when we apply the constraints we get an error of contraint ORA-00001: unique constraint (NPI.TABLEB) because castor first try to create the rows and then apply the delete option. In our code we have checked it and we always make a delete and then a creating of new object. In the application Logs we can check that first we make a Creating option and then Delete DEBUG [INST-Thread-5] (MappingObjWrapper_v2.java:960) - getting new date today DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Creating es.optare.util.castor.Detail_003 (null) DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Creating es.optare.util.castor.Detail (null) DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Creating es.optare.util.castor.Detail (null) DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Creating es.optare.util.castor.Detail (null) DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Storing es.optare.mslv.connectors.jdo.MappingObjWrap er_v2 (18) DEBUG [INST-Thread-5] (MappingObjWrapper_v2.java:960) - getting new date today DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Removing es.optare.util.castor.Detail_003 (39) DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Removing es.optare.util.castor.Detail (98) DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Removing es.optare.util.castor.Detail (99) DEBUG [INST-Thread-5] (Log4jStringWriter.java:62) - [castor] Castor: Removing es.optaer.util.castor.Detail (100) *The Master object A is MappingObjWrapper_v2, and B and C (es.optare.util.castor.Detail, es.optare.util.castor.Detail_003) You casn see it, first Create and then Remove, so if the constraint is disabled it works, but if the constraint is enabled no. I suppose that this is a bug but i can´t find it and we are thinking in migrating the castor version if it solve our problem so if the bug is solved, tell me the version to make a trial. Thanks in advance. ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] ------------------------------------------------- |
- [castor-user] [JDO] Database UNIQUESS Constraint... Xose Ramon Sousa Vázquez
- Re: [castor-user] [JDO] Database UNIQUESS C... Ralf Joachim

