openjpa « Map « JPA Q&A

1. Problem with bidirection ManyToOne

I have two entities: Message and GeneratedMemberMessage. There are more fields than I'll show in code here, but these should provide enough for context to my question. I'm trying ...

2. JPA ManyToMany referencing issue

I have three tables. AvailableOptions and PlanTypeRef with a ManyToMany association table called AvailOptionPlanTypeAssoc. The trimmed down schemas look like this

CREATE TABLE [dbo].[AvailableOptions](
  [SourceApplication] [char](8) NOT NULL,

3. How to generate ORM.XML mapping files from annotations?

At work, we design solutions for rather big entities in the financial services area, and we prefer to have our deployment mappings in XML, since it's easy to change without having ...

4. JPA mapping classes (openjpa)

Let's say I have a Question and QuestionHeader class. Question extends QuestionHeader. My mapping looks like this:

<entity class="">
    <table name="question" />
    <inheritance strategy="SINGLE_TABLE" />

5. Problems when using inheritance with Hibernate

I am working on a little exercise and I am facing some problems when calling a select query. Basically I've created an Abstract class in the following way:

entity --class ~.AbstractStage --mappedSuperclass  ...

6. JPA entities and mapping file cannot be resolved in RSA

In my RSA IDE I have a JPA project and another project where the entity classes reside. I had to do this splitting because the entity classes are being used ...

7. How can I get OpenJPA to work with for joined inheritance strategy?

I'm unable to get a joined inheritance strategy working with OpenJPA 2.1.0 and a Java EE app running on Glassfish 3.1. Here are my JPA annotations:

    @Table(name = ...

8. How to override persistence.xml properties in OpenJPA

I have the following property in my persistence.xml :

<property name="openjpa.ConnectionProperties"
I am trying to override it using a system property, as per the docs, so I have set:
But it doesn't ...

9. Mapping A Field To A Custom Query in OpenJPA

I have a class, Location. Location contains a List of coordinates that define its border.

public class Location implements Serializable {

   private int id;
   private List<Coordinates> coordinateList;


10. JPA mapping - collection map half generated id

JPA mapping - map half generated id. Help! I have been working on this for a while. I do not want to create a LocalString class. I would have to many instances. OpenJpa I can't figure ...

11. ManyToOne persist fails after migration to OpenJPA

Hi, have some odd trobles after migration from hibernate to openjpa Simple many-to-one relation Each Answer aggregates Question it belongs to. @Entity @Table(name = "answer") public class Answer { @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}) @JoinColumn(name = "question_id", nullable = false) public Question getQuestion() { return question; } } @Entity @Table(name = "question") public class Question { //no need in bidirectional association } ...

12. OpenJPA Joins vs Mappings