Annotation « Eclipse « JPA Q&A

1. EclipseLink/JPA: Multiple @DiscriminatorColumn annotations for Entity

I'm looking for a way in EclipseLink to have two @DiscriminatorColumns on the same entity My PostreSQL DB table is:

And classes are:
@Table(name = "dictionary")
@DiscriminatorColumn(name="object_type", ...

2. How to define the EclipseLink annotation for the following?

I'm relativly new to the world of EclipseLink, I've been reading through the documentation, however I'm having a real problem trying to represent the following table.

6544 ...

3. hibernate annotations

iam executing hibernate anotation example in eclipse galileo iam getting the following error.

Hibernate: insert into employee1 (Name, ID) values (?, ?)
Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update

4. Query all entities of a class with annotations

Is it possible to instruct EclipseLink to read ALL entities of some entity class to a field with annotations? For example, I want all persisted objects of class Y in the ...

5. Problem with JPA Project in Eclipse - error in class annotated @Entity: Table "xxx" cannot be resolved

I'm trying to create simple EJB + JPA project in Eclipse (Indigo). I created new EJB project where:

  • Target: existing Glassfish Server
  • Configuration: EJB Module + GlassFish Deployment Descriptor Files + Java + ...

6. eclipse plugin to create hibernate annotated entities?

i know that hibernate tools can create hibernate entities but the hibernate mapping will be in XML file, but i was wondering if there's a tool to create hibernate entities and ...

7. Question about: Annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' not found

I am trying to get the case study Dukes tutoring, Java EE tutorial, to run, but received the following error: Compiling 26 source files to C:\Program Files\glassfish-3.0.1\glassfish\docs\javaee-tutorial\examples\case-studies\dukes-tutoring\build\web\WEB-INF\classes error: Annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' not found 1 error C:\Program Files\glassfish-3.0.1\glassfish\docs\javaee-tutorial\examples\case-studies\dukes-tutoring\nbproject\build-impl.xml:520: The following error occurred while executing this line: C:\Program Files\glassfish-3.0.1\glassfish\docs\javaee-tutorial\examples\case-studies\dukes-tutoring\nbproject\build-impl.xml:250: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 1 ...

8. Annotations vs XML files with Hibernate in Eclipse

Need help with Hibernate? Read this first: ... AskForHelp Read that. Also read the first 6 chapters of Java Persistence with Hibernate. I've successfully reverse-engineered the legacy DB using the Hibernate tools (though Ant) and created a JPA project in Eclipse to allow me to work on the code. My problem is that Eclipse won't let me create a Hibernate ...

9. how to get hibernate annotations help in eclipse ide

hi, i am trying to add hibernate annotations in my source code. eclipse provides a code-complete help provided that the correct jars are in the classpath. so this will result in typing "@hibernate." and at this point eclipse provides all the relevant options availalbe. this is not working for me in my environment. i think i have added all the relevant ...