openjpa « Map « JPA Q&A





1. Problem with bidirection ManyToOne    stackoverflow.com

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    stackoverflow.com

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?    stackoverflow.com

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)    stackoverflow.com

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

<entity class="hr.leads.services.model.jpa.QuestionHeader">
    <table name="question" />
    <inheritance strategy="SINGLE_TABLE" />
  ...

5. Problems when using inheritance with Hibernate    stackoverflow.com

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:

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

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

In my RSA 7.5.5.2 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?    stackoverflow.com

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:

 @Entity
    @Table(name = ...

8. How to override persistence.xml properties in OpenJPA    stackoverflow.com

I have the following property in my persistence.xml :

<property name="openjpa.ConnectionProperties"
value="DriverClassName=com.mysql.jdbc.Driver,jdbcUrl=jdbc:mysql://localhost:3306/c,user=foo,password=foo,autocommit=false,automaticTestTable=testtable,idleConnectionTestPeriod=60"/>
I am trying to override it using a system property, as per the docs, so I have set:
-Dopenjpa.ConnectionProperties=DriverClassName=com.mysql.jdbc.Driver,jdbcUrl=jdbc:mysql://localhost:3306/bar,user=bar,password=bar,autocommit=false,automaticTestTable=testtable,idleConnectionTestPeriod=60
But it doesn't ...

9. Mapping A Field To A Custom Query in OpenJPA    stackoverflow.com

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

@Entity
@Table(name="LOCATION")
public class Location implements Serializable {

   private int id;
   private List<Coordinates> coordinateList;

  ...





10. JPA mapping - collection map half generated id    stackoverflow.com

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    coderanch.com

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    coderanch.com