eclipselink « EntityManager « JPA Q&A

1. EclipseLink, EntityManager with two persistence units needed

I have one jar library A (or project in eclipse), which has it's own persistence unit (META-INF/persistence.xml) and some entity classes, and another project (B) using this one. In project B ...

2. How to use EntityManager from @PrePersist?

I have "post" entity/table with this "schema":

@GeneratedValue(strategy = GenerationType.AUTO)
int id;

@GeneratedValue(strategy = GenerationType.AUTO)
private Integer postId;

private Integer revisionId;
private Boolean isCurrentRevision;
So, table contains posts, each of them has multiple revisions, but only of them ...

3. problem with JPA EntityManager

i am new to JPA, i have a problem with my JPA . i have used the entity manager as follows:

1: package com.icesoft.icefaces.samples.datatable.jpa;
    3: ...

4. How to get Eclipselink Entity Manager?

I'm working on a C/S java project and try to use Eclipselink to do the ORM(client side cache database,derby). It's quite easy to do the query with examples & expressions, but when ...