About Transaction

forum_thread

Optimistic locking: prevent version increment on entity collection attribute

Hello, I have an entity E with an attribute which is a collection of entities (one to many relationship) with an optimistic locking strategy supported by a version field. Is it possible to prevent the increment of the version of entity E when entities are added to or removed from the collection? Something like the equivalent of @OptimisticLock(excluded=true) in Hibernate? Thanks, Farid ... the Reading's constructor and we are still in the same transaction (before any commit or rollback). In the debugger, when I ... Also, each of my calls to the server is made in a transaction (the entry point in the servlet is annotated with @Transaction for ...

 
release

2.6.4

... embedded objects to collections. Fixed large transaction temporary files implementation ( feature request #255 ). ... exception on pessimistic locking retrieval with no active transaction. Improved support of entity objects in criteria ...

 
forum_thread

Updating existing persistence entries

I have stored some instances of MyObject via em.persist(myObjectInstance); I can fetch them and bind them to a kind of property editor in my app (it simply calls the setters to reflect gui editing actions). When I try to persist a object later on, I get an error like com.objectdb.o.UserException: Attempt to reuse an existing primary key value which makes sense to me but I'm missing a em.update() method. ... get it to work. The transparent update needs a transaction to be started and then committed after the setter of an persisted ... CRUD operations. When I use hibernate I can initiate a transaction, feed my persisted object which may have changed for one or more ...

 
forum_thread

"Attempt to lock a non entity object" error

Probably a simple answer for someone who's been using ObjectDB for awhile: I'm reading objects from the database outside a transaction (inside doesn't seem to matter). First cycle of doEdit and then doCancelEdit works fine. Second time I doEdit produces the error "Attempt to lock a non entity object" session.rollback() is somehow causing the problem (found through debugging) Is this enough information for someone to suggest what might be happening and how to fix it? ... I'm reading objects from the database outside a transaction (inside doesn't seem to matter). First cycle of doEdit ... all managed entity objects: ... Rolling back a transaction - either by invocation of rollback or by a commit failure." ...

 
forum_thread

Fantom

  Hi, so far I've been able to get ObjectDb to persist objects from many JVM languages, eg.: Java/Groovy/Scala/Kotlin. However, I can't seem to get Fantom to work. Anyone tried this yet? Dave     ... ( ) . with { transaction. begin ( ) persist ( new Address ( street : "Groovy" ) ) transaction. commit ( ) }   @ Entity ... com.objectdb.o._RollbackException: Failed to commit transaction: Failed to get reference value of field field ...

 
forum_thread

Join query problem with new statetment

Hi, I'm trying to implement some reporting logic in my application and got nasty exception when using query with join. The query code is: ... DEBUG o.s.orm.jpa.JpaTransactionManager - Should roll back transaction but cannot - no transaction available 2011-07-05 06:40:34.847 ["http-bio-8080"-exec-3] DEBUG ...

 
manual

[ODB1] Chapter 4 - JDO Metadata

Shows how to define JDO metadata for persistence capable classes.... stored in the database. The main difference is that, on transaction rollback, it returns automatically to its value at the beginning of the transaction. default-fetch-group (true | false) The ...

 
forum_thread

Clarification on free license restrictions

Hello,   My apologies if the answer is already on the website, but I’m struggling to find a definitive answer.  The 10 entity class restriction is very clear, but can each of these classes use unrestricted numbers of embeddable classes?  Do embeddable classes count as part of the ten?  I assume not, but I need to check before I code further (and learn more about the product).   ... get the following error: Error: Failed to commit transaction: Attempt to store an instance of a non persistable type ...

 
issue

ArrayIndexOutOfBoundsException: -1

I've attached a test which fails with the error "ArrayIndexOutOfBoundsException: -1". It runs 10 threads which create and persist objects. The objects are based on application objects so its not a single class test I'm afraid but it is standalone. I'm running as follows: java -classpath objectdb.jar;test.jar PersistTest I've attached the test jar, a jar containing the source and the odjectdb.conf. ... javax.persistence.PersistenceException Attempt to commit a transaction after failure in writing to database file ... by: com.objectdb.o.UserException: Attempt to commit a transaction after failure in writing to database file ... newer users. The result is catastrophic, since a new transaction may commit mixed old and new pages. Therefore it could corrupt the ...

 
forum_thread

Run out of memory

Hi, I've been looking into ObjectDB for our use, where everything has been great apart from I'm stuck on the following problem.   I am trying to load a large file (> 1GB), process certain information and store it back in the database to access / modify later. I require to be able to rollback changes as well, where there can be massive amount of changes.   ... changes in memory until commit. As a result, the transaction size is limited by the available JVM heap size. Actually to be able to store 1GB of data in a single transaction you currently need about 2.2GB of available JVM heap. ...