eclipselink « Map « JPA Q&A





1. JPA ManyToMany problem    stackoverflow.com

Hello i have an Entity Exam

 @Id
    @GeneratedValue(strategy=GenerationType.TABLE)
    private Long id;
    .....
    ......

    @ManyToMany
   ...

2. Persist data when the table was not mapped (JPA EclipseLink)    stackoverflow.com

I need some help in persisting data into a table that has not been mapped. Our database has a table in which all of its columns are foreign keys so by mapping ...

3. ManyToMany JPA fetch    stackoverflow.com

Hi I have a problem fetching the skills from the volunteer. for some reason i dont get the list when using this method

public Volunteer getVolunteer(int id){

 Volunteer vo;

 Query q;

 q ...

4. Mapping column and table names in EclipseLink    stackoverflow.com

I used ImprovedNamingStrategy in hibernate, to mapping Java field name to MySQL column name. ex) birthDate field -> birth_date column, AccountRole class -> account_role table I'm doing test migrating hibernate code to eclipselink ...

5. Mapping Oracle XMLType on JPA (EclipseLink)    stackoverflow.com

We have a project with some special requirements, one of wich is getting data from a XMLType database column from an Oracle 10g database. We have found an easy solution using JDBC, ...

6. JPA EclipseLink ManyToMany with Data    stackoverflow.com

I'm currently trying to implement a ManyToMany Relationship with Data in the JoinTable. I'm following this approach with the Eclipselink JPA Framework. But I'm getting the following exception:

org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210) ...

7. JPA entity mapping to optional SecondaryTable    stackoverflow.com

I have an entity. I would like to optionally load additional information about the entity from a secondary table. I have the following mapping.

@Entity
@Table( name = "program", schema = ...

8. Problem with ManyToMany and JPA EclipseLink    stackoverflow.com

I've got a ManyToMany Relationship with composite key between a User and a Group in JPA EclipseLink. My Implementation looks like that: User Class:

@Entity
@Table(name="mbm_user")
public class User extends CanAccessBook{

@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(nullable = false)
private Long ...

9. Error in JPA mapping - Fetch Comments    stackoverflow.com

I'm trying to fetch comments using the ticket field as a foreign key but I'm getting the following errors:

Caused by: Exception [EclipseLink-6078] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.QueryException
Exception Description: The class ...





10. Problem in JPA-Mapping    stackoverflow.com

I have a situation where my DB tables are like below, I am wondering how to have JPA mappings for this kind of tables , espacially for the auction_param_values which do ...

11. Bi-directional Many to Many JPA    stackoverflow.com

I having a hard time with JPA hopefully someone can help me. I have 3 tables:

  • Rol (CPE_ROL)
  • TipoUsuario (GTV_TIPOUSU)
  • RolTipoUsuario (CPE_ROLTUS - Join Table)
Rol.java
@JoinTable(name = "CPE_ROLTUS", joinColumns = {
    ...

12. Class "Department" is mapped, but is not included in any persistence unit    stackoverflow.com

I am getting this error and I have no idea the reason: Class "Department" is mapped, but is not included in any persistence unit. I have two project. One is In my persistence.xml, ...

13. @ManyToMany - data does not persist in Database    stackoverflow.com

Simplifying, in my database I have tables:

Car (pk="id_car")

CarAddon (pk="id_car_fk,id_addon_fk", 
`FK_car_addon_addon` FOREIGN KEY (`id_addon_fk`) REFERENCES `addon` (`id_addon`)
`FK_car_addon_car` FOREIGN KEY (`id_car_fk`) REFERENCES `car` (`id_car`)

Addon (pk="id_addon")
Shortly: I have cars, many cars can has many ...

14. EclipseLink entity mapping problem when using property accessor methods    stackoverflow.com

Given the class below does anyone know why EclipseLink implementation of JPA fails to map them to database entities? The following error is returned: Entity class [class com.my.entity.Y] has no primary ...

15. Eclipselink ValidationException    stackoverflow.com

I am trying to adapt my data model to use a BaseEntity base-class. The following code represents the general idea:

    @MappedSuperclass
    public abstract class BaseEntity ...

16. Child entity is null after parent entity is persisted and selected    stackoverflow.com

Please help! It has already taken me a day, and I am no closer to resolving the issue. My set up is as follows:

  1. Eclipse Indigo
  2. Eclipselink 2.3
  3. Apache Tomcat 6
What I am doing ...





17. Multiple writable mappings exception in EclipseLink    stackoverflow.com

I have these tables: tables Which my intention is : A user can be a company or a person but each one of them have something in common, as username which ...