About Entity

issue

Issues with JDO Casting & Full Qualified Names

hi! See this query and the comments about failures. This is really urgent for us because as you've stated, this is the only workaround for now to proper casting AND map KEY access though it isn't working correctly either.. ... Embeddable ; import javax. persistence . Entity ; import javax. persistence . EntityManager ; ... ) . begin ( ) ; MyEntity entity = new MyEntity ( ) ; entity . embeddeds ...

 
forum_thread

Selective merge/cascade of detatched entity

I'm having an issue with my application, and I'm hoping you guys will be able to help. Please forgive typos and obvious errors, I'm having to retype from a non-internet connected network. A contrived example is: ... network. A contrived example is: @ Entity public class Salesman { private String name ... companyTargets ; }   @ Entity public class Company { private String name ; ...

 
manual

Paths and Types in JPQL and Criteria API

Explains how to use object expressions (path navigation, type) in JPA/JPQL. Instances of user defined persistable classes (entity classes, mapped super classes and embeddable classes) are represented in ... Navigation through a NULL value Entity Type Expressions Criteria Query Paths and Types ...

 
api-jpa

merge(entity)

Merge the state of the given entity into the current persistence context.(Method of javax.persistence.EntityManager)

 
forum_thread

Duplicate Entity class names causes Exception in Query

I have two Entities which have the same class name but reside in different packages, only one of them is mentioned in the persistence.xml. I a NamedQuery I use the unqualified class name of one of these entities. If I execute that query I get an exception;   ... objdbTest ;   import ....   @ Entity @ NamedQueries ( { @ NamedQuery ... 01:18 Every entity class should have its own name - using the same entity name for two ...

 
forum_thread

Mysterious "Attempt to persist a reference to a non managed instance" error

I've been working with ObjectDB for the past several months, and it's behaved pretty much as expected. I made a few modifications to a working set of classes today, and it's started throwing exceptions at commit time. I've stripped it down to a  set of files that seem to be of trivial complexity, but it's still failing. It involves two entities, Index and Ostrich. The thing to note is that the Index structure is recursive through maps; but that's never caused any problem for me in the past. ... Serializable ; import javax. persistence . Entity ; import javax. persistence . Id ;   @ Entity public class Ostrich implements Serializable { ...

 
issue

ObjectDB-2.6.9: Failed to commit transaction: Failed to set numeric value of field property Element.id using reflection

The following error is reported for objectdb-2.6.9.jar: Failed to commit transaction: Failed to set numeric value of field property com.greensoft.objectdb.test.entity.Element.id using reflection (error 613) Did not happen with objectdb-2.6.3_04 (which one can easily test and compare in the test console app for NetBeans8.1 provided, as explained below). To reproduce download the app and unpack, open in NetBeans8.1, perform Clean and Build, and Run: ... value of field property com.greensoft.objectdb.test.entity.Element.id using reflection (error 613) Did not happen with ... is an Ant script with post-compile enhancement of all entity classes. When you clean and build it will report: Java/JVM ... 1.8.0_74 ObjectDB enhancer: begin: (all classes within entity packages): javac.classpath:lib/objectdb-2.6.9.jar [ObjectDB 2.6.9 ...

 
api-jpa

persist(entity)

Make an instance managed and persistent.(Method of javax.persistence.EntityManager)

 
forum_thread

Package name for persisted entities

Hi, I have a question about package name and searching for entities. As for now we were using two different databases for two different parts of our system. But we want to make a 'common' model for both systems. After merging entities from two different projects, we get single jar with all entities. Unfortunately some of the names are the same for entities: - homplex.model.dbobject.Inspiration - pl.hplxtool.model.Inspiration ... class. So my question is - is it possible to match entity name using full canonical name instead of only entity / class name? Or maybe it's a bug? Or maybe there is a way to set ...

 
forum_thread

Unable to persist TreeMap

import java.util.SortedMap; import java.util.TreeMap; import javax.persistence.Entity; //---------------- @Entity class Person { public SortedMap<String, String> memberships = new TreeMap<String, String>(); } //Person   ... . TreeMap ; import javax. persistence . Entity ; //---------------- @ Entity class Person { public SortedMap<String, ...