object « Entity « JPA Q&A





1. Hibernate Updating an existing entity with a new object    stackoverflow.com

Assume I have an entity Foo in the DB. I am parsing some files and creating new Foo objects and would like to check if the parsed Foo object exists in ...

2. How to import entities and its dependent objects via excel    stackoverflow.com

We have a simple data model reflecting the following...

  1. User contains many @OneToMany addresses
  2. User contains many @OneToMany phones
  3. User contains many @OneToMany emails
  4. User belongs to a @Organization via @ManyToOne
We would like the customers ...

3. JPA Entity Creation - Objects vs. "Primitives"    stackoverflow.com

I have a question for entity creation. Say I have the following tables

create table "foo" (
  "id"          integer primary key,
 ...

4. JPA 1.0: How to write an efficient transformer from an entity to a transfer object?    stackoverflow.com

I want to write an efficient transformer, that will transform a JPA (1.0) entity to my transfer object and that:

  • will be called in a transactional context,
  • will cause no extra DB interaction, ...

5. java.lang.Object is not an indexed entity    forum.hibernate.org

I am trying to use Hibernate Search 3.4.1.Final in JBoss 6.1 I was facing classloading problems until I change every lib to provided in my pom.xml. Only Hibernate Search and Hibernate Entity Manager libs are in my pom.xml with compile scope. I have only one simples class to be indexed with common types (such as Integer and String). When I try ...

6. Object and Entity    forum.hibernate.org

Hi there I just wondering from Hibernate document chapter16 about parent/child example as I quote below: # If an object that was removed from a collection is an instance of a value type (eg, a composite element), that object will cease to be persistent and its state will be completely removed from the database. Likewise, adding a value type instance to ...

7. SaveOrUpdateEvent "object" & "entity"    forum.hibernate.org

8. QuerybyExample using parent object with other entity objects    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1 I want to search an entity object that has other entity objects as children (In a one to many relationship). Below is an example of what I more of less have. Since the search will have multi-criteria, it made sense for me to use the qbe. Code: public ...

9. The persistence entity object return cannot be set    forum.hibernate.org

Hi, I have defined 3 tables as below: Listing ================== ID Description ================== 1 My book is good -------------------------------- 2 My car is for sale -------------------------------- 3 My pda is for sale ================== Alert ================== ID Keywords -------------------------------- 1 book -------------------------------- 2 book -------------------------------- 3 sale -------------------------------- These 2 tables has no relationship at all. What I need to do is ...





10. persisting entity causes object graph traversal    forum.hibernate.org

Hello, We are using hibernate 3.X thru JPA. So I have an entity and it has many relationships thru collections to many other entities. Our code generator marked all these collections with "CascadeType.All" and "fetch=FetchType.LAZY". When we persist entity A by calling EntityManager.Persist(), i see that Hibernate is hitting the DB to load the collections on the A - many many ...

12. Hibernate Updates Sub Entity Objects when Save Top Object    forum.hibernate.org

Author Message radar001 Post subject: Hibernate Updates Sub Entity Objects when Save Top Object Posted: Fri Sep 25, 2009 4:33 pm Newbie Joined: Thu Sep 24, 2009 10:32 am Posts: 3 Hi there. Let's suppose there is a top level entiry object called ClaimCase. In each claim case you can have 0+ instances of Party. Party can be subclassed, ...