Entity « Eclipse « JPA Q&A





1. The same objects in JPA    stackoverflow.com

I have entity model like this (using EclipseLink and JPA 2.0):

@Entity
    class A {
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
 ...

2. Eclipselink entity class autoscan finds non-entities    stackoverflow.com

I've activated the auto-detect mode of Eclipselink 2.0 to find @Entity annotated classes:

<exclude-unlisted-classes>false</exclude-unlisted-classes>
But Eclipselink tells me that I should add an ID to my Entity:
Caused by: Exception [EclipseLink-7161] ...

3. Eclipselink is living in the past, DDL not reflecting Entities    stackoverflow.com

Weird stuff... I have happily used EclipseLink / JPA 2 as provider for my persistence unit for a while (with a MySQL RDBMS in the back). I had DDL-drop/create turned off, ...

4. EclipseLink/JPA EntityListener: Check if entity is modified    stackoverflow.com

I'm using default EntityListeners (preUpdate and prePersist) to write create and update timestamps to my entities. When a new child is added to a collection (OneToMany) and persist is called the ...

5. How to declare a Interface Descriptor for independent entities under common interface using EclipseLink?    stackoverflow.com

We have the situation where we need to associate different entities under one attribute and use this attribute in a query. The project uses JPA with EclipseLink as the implementation. Example code ...

6. JPA illegalStateException - CascadeType issues    stackoverflow.com

I was hoping someone can shed some light on this for me. I do not really understand what is going wrong with this error. I have an entity that I am ...

7. Inserting JPA entities with read-only field    stackoverflow.com

I have an entity with some fields that are in other tables, that I don't want inserted/updated when persisting/merging the entities, in effect read-only fields. Example entity (shortened for brevity):

@Entity
@Table(name = "APL_COMPETITION")
@SecondaryTables(@SecondaryTable(name ...

8. Problem removing entity with JPA    stackoverflow.com

UPDATE My friend did the same lines of code and his lines just worked. What could it be? I use NetBeans 7.0.1 and his is 6.9.1. My GlassFish is 3.1 and his ...

9. eclipse JPA - recreating JPA Entities re-writes classes - is there an alternative?    coderanch.com

hello i think this is something that i am missing when using eclipse to create/recreate my JPA entities' classes. if i decide to recreate the entities eclipse will overwrite them and destroy any @NamedQuery that i have added. is there some configuration in eclipse that would allow for me to change this behaviour? i am sure that netbeans keeps @NamedQuery when ...





10. Unknown Entity when using several Eclipse Plug-Ins    forum.hibernate.org

Hello Hibernate-Community I'm using Hibernate 3.2.0 with annotations in Eclipse 3.2.1 plug-ins and I have the following intention: I would like to encapsulate the Hibernate libs and the session handling in a single plug-in, called org.myplugin.hibernate. This plug-in defines an extension-point: Extensions provide the classes that should be mapped and for this, they have to implement my interface IModelProvider. The mappings ...