About inverse

forum_thread

Objectdb Doctor

Hi, I have deleted an instance of ClassA. However, if I try to access ClassB, which has a field of type ClassA, ClassB.classA, then, rather than getting a null pointer for classB.classA, I get an enormous exception. How does the ObjectDB Doctor help?  ... from other objects in the database (except references in inverse / mapped by fields, which are not stored but rather computed on the fly ...

 
api-jpa

javax.persistence.JoinTable

Used in the mapping of associations.(Annotation of JPA)

 
forum_thread

Modifier operations

Hi, Today I was reading about different NoSQL databases. One of those database - MongoDB - has a very nice feature, especially for web applications - modifier operations. The whole trick for those operations is to change some value in object without pulling this object from database. So for example we have class: public class WebVisit { public String url; // key public int visitsCount; } As for now I have to pull this class from database: ... If the list is managed as an inverse (mapped by) field - you should be able to use an update query on the ...

 
api-jpa

javax.persistence.OneToOne

Defines a single-valued association to another entity that has one-to-one multiplicity.(Annotation of JPA)

 
forum_thread

Possible issue for JPQL IS EMPTY expression

Possible issue for JPQL IS EMPTY comparison expression: SELECT e FROM MyEntity e WHERE e.collection-valued IS EMPTY throws javax.persistence.PersistenceException: Invalid operand type  for operator IS EMPTY (error 756) Thanks. ... operators are currently not supported for mapped by (inverse) collections. Please see more details and a possible workaround ...

 
forum_thread

EntityManager.refresh takes a long time

EntityManager.refresh takes a long time for entity object Person in this code: ... includes running many queries in order to refresh all the inverse (mappedBy) collections, and then recursively other objects. Apparently ...

 
forum_thread

Removing objects where ManyToMany relationships exist

Consider you have an entity Entity with the following unidirectional relationship: @ManyToMany private Set<OtherEntity> setOfOtherEntities; public Set<OtherEntity> getOtherEntities() {     if (setOfOtherEntities == null) {       setOfOtherEntities = new TreeSet<OtherEntity>();     }     return setOfOtherEntities;   } ... It depends. On retrieval - inverse (mapped by) collections are usually slower. On update - they may be ...

 
forum_thread

Cannot sort descending, when ordering by caluculated float in a method

Hi, I have found an issue in ordering by a method. I have two entities : Invoice and InvoiceItem. public class InvoiceItem{ ..     private float price;     private float amount; .. }   public class Invoice{ ... OK. It seems that mapped by (inverse) fields are unavailable to methods in queries, regardless if the method ...

 
forum_thread

Object explorer cannot open odb file. ObjectDB many-to-many relationship

I created a data model to test many-to-many relationship with a link table as following (full code in attachement) ... Just be aware that navigation from the mapped by (inverse) side to the owner side is slower since it requires query execution. ...

 
forum_thread

Is it possible to remove parent/child entities without refresh?

We have a big object tree in our project. If I use the entityManage.remove method a entityManager.refresh is necessary in order to have an updated object tree in memory. But entityManager.refresh is too slow for our project. Do you know a possibilty to remove parent/child entities without entityManager.refresh after the entityManager.remove operation? I have searched for a solution with the following unit test (See testRemoveVariant2()). But my approach works correctly. Do you have an idea? ... revised test case demonstrates an ObjectDB bug in handling inverse (mapped by) collections and maps in reflection mode (note that the test ...