About detach

forum_thread

OptimisticLockException

Have read read the documentation on optimistic locks, still not sure how to deal with these exceptions: [ObjectDB 2.2.5_04] javax.persistence.RollbackException Failed to commit transaction: Optimistic lock failed for object   #1 2011-05-28 22:27 Have read read the documentation on optimistic locks, still not sure how to deal with these exceptions: [ ...

 
forum_thread

Failed to write the value of field using reflection (error 363) on LAZY fetch

Hi There I am using ObjectDB 2.6.3. I get the following Exception when I try to read my entities with a query where I have set to use LAZY initalization. It fails when it tries to set a 1:n member (e.g. a Modell has several Artikels) . When I remove the LAZY hint on the query execution it works. Any hints why this can happen? The Mapping of class Modell and its member: ... that also suggests a new setting ("objectdb.temp.no-detach") that may be useful for you. Regarding setting Spring Framework ...

 
forum_thread

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

In the code example below (also attached) I would like to understand why I am able to print to console a lazy @OneToMany mapped field after a finding entity manager closes. There is a switch DO_VIEW_BEFORE_CLOSE, and when it is true the fields are accessed and output before the finding entity manager closes and as expected both a mapped @OneToMany list and an unmapped @OneToMany list are viewable: a.listA_mapped:[{A}[4]"ownedElement1", {A}[5]"ownedElement2"] a.listB_unmapped:[{B}[2]"b1", {B}[3]"b2"] #1 2012-03-14 01:37 In the code example below (also attached) I would like to understand why I am able to print to console a lazy @On ...

 
forum_thread

Mismatch client-server protocol prefix

Hello! We migrated one of our legacy webservices to Spring Boot/Spring MVC. Now i have a strange problem. At first the app runs perfectly for a couple of hours. After that it stops working and I get the following exception: ... ( ) ;</ strong > em. detach ( result ) ; return result ; ...

 
forum_thread

@OneToMany(fetch = FetchType.LAZY) list is always null

Hello. @OneToMany(fetch = FetchType.LAZY) doesn't work when using EJB or something else related to J2EE. parent.getChildren() returns null. Here is a simple example: Bean: ... OK, I'll try setting objectdb.temp.no-detach. edit ... demonstrates the issue? If it is related to the no-detach option then the same test case should work differently, depending if ...

 
forum_thread

Java 8 Enhancer Problem

Hello! I am currently migrating my project to Java 8. I'm using Spring and AspectJ load time weaving. Unluckily the LTW option of Spring is global. If it's enabled it also tries to find other class transformers on the classpath. This is normaly not a problem because the ObjectDB enhancer ignores non @Entity or already enhanced classes but in conjunction with new Java 8 class files it throws an exception which causes Spring to stop weaving.  ... fixes this issue but it has a new bug. When I fetch, detach, change and merge an object I get the following exception: Caused ...

 
forum_thread

Removing entity class

Hello, I am using evaluation version of ObjectDB for long term private project. Recently I hit the 10 entities limit and got exception: com.objectdb.o.UserException: Too many persistable types (>10) - exceeds evaluation limit Among the 10 entities in the project there are 2 entities I added long time ago and they were never really used. I deleted them from Java source code, but there are still in ObjectDB database. The 2 tables for these entities are empty, but the tables exist, so they count into 10 entities limit. ... You can retrieve all your objects, detach them, and then persist them to a new database. If the database ...

 
forum_thread

ClassCastException on closing PersistenceManager

Hi, I am using ObjectDB 2.6.3.b03 via JDO. Today I got the following exception while closing the PersistenceManager after reading the DB: #1 2015-10-14 13:53 Hi, I am using ObjectDB 2.6.3.b03 via JDO. Today I got the following exception while closing the Per ...

 
forum_thread

Possible issue with LAZY Loading

Hi, We need lazy loading for one of our large data sets. When I run currently against both 2.4.2 and 2.4.3_01 the db is always returning everything, including the data marked as Fetch.LAZY.  I wrote the attached unit test, and then found this: http://www.objectdb.com/database/forum/9 As far as I can tell, my unit test is pretty much identical. Not sure why this doesn't work. Thanks Paul. #1 2012-09-13 01:43 Hi, We need lazy loading for one of our large data sets. When I run currently against both 2.4.2 and 2.4. ...

 
forum_thread

Dirty checking

Hi, wondering if anyone knows the best way to detect which objects have been changed in the database. ie: which objects, and which collections of objects, have been dirtied.     #1 2017-01-30 07:41 Hi, wondering if anyone knows the best way to detect which objects have been changed in the database. ie: ...