Persist « Eclipse « JPA Q&A





1. How to cascade persist using JPA/EclipseLink    stackoverflow.com

I am having problems performing a cascade persist operation on a parent entity. When the child entity is persisted, the reference (generated id) to the parent entity is null. ...

2. EclipseLink cascade persist exception    stackoverflow.com

I am getting "During synchronization a new object was found through a relationship that was not marked cascade PERSIST" when attempting to persist an object Word() that has a Many-To-Many field ...

3. Problems with generating sql via eclipseLink - missing separator    stackoverflow.com

i'am using eclipseLink with jpa. in my persistence.xml, i defined to generate a create.sql file. the file will be generated, but with missing ';'-separators for each sql statement. is there a possibility to ...

4. Why does eclipselink/jpa attempt to persist an entity while I don't ask it to?    stackoverflow.com

I'm trying to persist 3 entities (exp,def,meng) in a transaction, and then persist another 2 (def', meng'), where meng' is related to exp. However, as I attempt to persist meng' eclipselink/jpa2 is ...

5. JPA: Eclipselink does not persist bi-directional relationships in database    stackoverflow.com

My domain model in my Java EE 6 application contains bi-directional relationships like the following:

@Entity
public  class Users implements PrimaryKeyHolder<String>, Serializable {
  @Id
  private String username;

  @ManyToMany(mappedBy= "users")
 ...

6. How to get Eclipse JPA (Dali) to use persistence.xml from another project?    stackoverflow.com

I have two Eclipse Maven Java projects. A domain project that is laden with JPA annotations and a persist project that implements DAOs for the domain objects. The ...

7. Jointable update between transient and persistent objects?    stackoverflow.com

I have a Many-to-Many relationship between a persistent object (retrieved by a query) and a newly created transient object (created with new, not yet persisted). They are connected via a @JoinTable association, ...

8. javax.persistence.* sources, where?    stackoverflow.com

I might be missing something really obvious here, but i couldn't find the sources for a few classes from the javax.persistence package.
I'm using EclipseLink as a JPA provider. When i tried ...

9. How to enable swapping db connection parameters with EclipseLink/JPA    stackoverflow.com

We have projects of various types such as a backend java process and a front-end tomcat app that currently use EclipseLink/JPA and persistence.xml to get the db connection info. Is ...





10. Multiple logins of a persistence unit?    stackoverflow.com

Hey guys I'm using eclipse link for JPA in my Java SE project. I'm using "jpa controller" classes for each of my tables in my databases(is this the correct way). ...

11. Database settings in persistence.xml not used    stackoverflow.com

I'm new to JPA, and to try to teach myself, I'm setting up a tiny web application and deploying to Glassfish 3.1. JPA works fine when I refer to a JNDI DataSource ...

12. JPA Error: duplicate key error when persisting a relationship    stackoverflow.com

Hello
I'm using the JPA to persist some java classes as shown below. The persistence of Y seems to work fine as long as the database does not contain elements of the ...

13. JPA 2 - OneToOne cross reference    stackoverflow.com

I have been struggling with this issue for a while now, and can't seem to find a solution anywhere. Maybe I have misunderstood something, but would really appreciate it if someone ...

14. JPA persistence.xml    stackoverflow.com

Is there a way to make the data on the persistence.xml dynamic? I was thinking of adding a database name property on my properties file, then the tables are created, if not ...

15. EclipseLink JPA: How can I specify zeroDateTimeBehavior=converToNull    stackoverflow.com

I need to set the zeroDateTimeBehavior property to convertToNull in my EclipseLink configuration. I am using a properties file where I am using javax.persistence.jdbc.url and other similar properties. But where can ...

16. How do I prevent EclipseLink (JPA 2.0) from clearing my database/table?    stackoverflow.com

I'm using EclipseLink (JPA 2.0) on Netbeans 7.0 with a MySQL database - which I configured according to this screencast. But sometimes when I persist an Object/Entity my table ...





17. Persistence.xml where to put in eclipse project    stackoverflow.com

Simple question...
I have a few projects in Eclipse enviroment
MainApp(Enterprise Application Project) which "includes"

  1. WebController (EJB Project)
  2. WebModel (JPA Project)
  3. WebView(Dynamic Web Project)

Problem is where to put persistance.xml file? Getting exception: java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for ...

18. Java JPA (EclipseLink) How to receive the next GeneratedValue before persisting actual entity?    stackoverflow.com

Good afternoon, everybody. I'm using the EclipseLink implemetation of JPA and i've got a problem. Here is my entity class:

@Entity
@Table(name = "attendances")
public class Attendance implements Serializable {
private static final ...

19. JPA not insert the data in the row after persist    stackoverflow.com

I am using an ID generated value in my entity

@Id
@TableGenerator(
    name="marcaTable",
    table="JPA_WXS_APP_SEQUENCE_GENERATOR",
    pkColumnName="GEN_KEY",
    valueColumnName="GEN_VALUE",
    pkColumnValue="MARCA_ID",
  ...

20. Updated data (in Database) is not visible via JPA/Eclipselink    stackoverflow.com

I have Oracle DB and Java project which is connected to the DB using JPA/Eclipselink.
The problem is that when some data updated in the database (manually using Oracle SQL developer), this ...

21. persistence.xml cache property warning    stackoverflow.com

I'm using eclipse indigo for EE developement to develop an SE project, just to take benefit from the JPA project support.
I created a JPA project, here's the properties of my persistence.xml ...

22. Why entity cannot be found if I did detach after persist    stackoverflow.com

I have Stateless Session Bean with Container-Managed Transactions. I want to return unmanaged entity after create (persist) it in a database. That's how I do it:

@Stateless
public class MyBean {

 ...

23. How do I configure allocationSize within persistence.xml instead of Entity    stackoverflow.com

Is there any possibility to do a kind of "refactor" of allocationSize in order to put it inside the perssitence.xml instead of having to configure it inside each Entity ? here's what ...

24. determine location of persistence.xml    stackoverflow.com

I'm trying to use jpa in a desktop application. I keep getting the error No Persistence provider for EntityManager named <unit> and I suspect that my persistence.xml cannot be located. I've placed ...

25. jpa: how to use different databases with relationships between them    stackoverflow.com

In a single Mysql database installation I can create different databases with cross-database relationships. My goal is, for example, to use relationships between people on database A and adresses on database ...

26. glassfish-resource.xml and persistence unit in eclipse ang glassfish v3.0    stackoverflow.com

I created a Web project in eclipse and adding a glassfish-resource.xml init and configure it with my database url. also I added a persistence.xml unit in my project and add a jta-datasource ...

27. EclipseLink JPA - location of persistence.xml    stackoverflow.com

I am using JPA for a java class and having trouble putting the persistence XML file where it should be. The IDE i am using is Eclipse Helios. Eclipselink jar files are ...

28. Access JPA programmatically    stackoverflow.com

is it possible to access the information in <persistence-unit-metadata> through Java API?

<persistence-unit-metadata>
    <persistence-unit-defaults>
        <schema>MySchema</schema>
    </persistence-unit-defaults>
</persistence-unit-metadata>
I would like to ...

29. JPA EclipseLink orm.xml and persistence.xml    coderanch.com

All, I am new to JPA and using Toplink (Oracle's distribution of the open-source EclipseLink) with JPA annotations . I am a bit confused with the purpose of the orm.xml and persistence.xml. All the JPA based java classes (representative of each underlying database table) should be cataloged in the orm.xml file or persistence.xml file. I have seen examples on the internet ...

30. Change the location of persistence.xml in JPA (Eclipselink 2.3)    coderanch.com

Greetings! I'm new to JPA and am using EclipseLink 2.3 for persistence and develop with Eclipse (Helios). I do not have Maven or Spring or anything else. I would like to change the location of the persistence.xml file inside META-INF folder. I have searched extensively and am not able to locate a good answer. Let me explain why. I'm not too ...

31. Eclipse RCP - no persistent classes found for query class    forum.hibernate.org

Author Message wintersleep Post subject: Eclipse RCP - no persistent classes found for query class Posted: Mon Oct 17, 2011 7:14 am Newbie Joined: Mon Oct 17, 2011 6:57 am Posts: 2 Hi, first of all, please excuse my poor English. I've created an Eclipse RCP Plugin-Project with a view. The view should show articles that are stored in ...