Re: Synchronizing two databases with the same model

2008-04-30 Thread Jonas Petersen
Hi Brill, thanks for replying. The thing is, that only certain parts (e.g. an entity with certain id including child objects) have to get synchronized at the time by demand of a content editor. The datastore is mysql 5. Jonas Brill Pappin schrieb: Actually, the most obvious approach is not

RE: Synchronizing two databases with the same model

2008-04-30 Thread Brill Pappin
Actually, the most obvious approach is not to write some special code, but simply enable replication and don't worry about trying to get OJPA to sync. What kind of database is it (most popular db's have replication of one sort or another)? - Brill Pappin -Original Message- From: Jonas Pet

question about extended context and transactions

2008-04-30 Thread Adam Hardy
If I am running JPA in extended persistence context, when I call EntityManager.merge() within a transaction and then commit the transaction, should it or shouldn't it execute the SQL? I assumed that it would but I have a situation where it won't unless I call EntityManager.flush() before commi

Synchronizing two databases with the same model

2008-04-30 Thread Jonas Petersen
Hi there! We have one data model and we need two datastores with that same data model. Datastore A for editing and previewing and datastore B for production (live). Now we need to synchronize parts of datastore A to datastore B. The most obvious approach would be: fetch objects from datastor

NPE at RelationToManyInverseKeyFieldStrategy when using mappedBy inverse

2008-04-30 Thread Michael Vorburger
Hello, I'm running into an NPE in RelationToManyInverseKeyFieldStrategy (copy/pasted below) when using an OneToMany inverse relation with mappedBy and InheritanceType.TABLE_PER_CLASS in 1.1.0-SNAPSHOT... Test summary: A common abstract superclass Translatable which has a @OneToManySet, and many

table prefixes without DBDictionary.getValidTableName(..)?

2008-04-30 Thread roger.keays
Hi, To implement automatic table prefixing I've written a DBDictionary with a custom getValidTableName(..) method. Unfortunately this only seems to be called if there is no @Table(name="X") annotation or equivalent xml. Is there a way to do this for _all_ table names? Thanks in advance, Roger