entity « EJB « JPA Q&A





1. How to make a weak entity using EJB 3.0    stackoverflow.com

suppose I have an entity "Employee", and an entity "Address". An employee has an address associated to him/her. In a relational database sense, the Address table would be considered a weak ...

2. Keep all entities in one ejb module    stackoverflow.com

There are few applications that use java persistence. Each application has its own set of entities that represents the same tables in DB. For instance, application A has entities for Table1, ...

3. Interface between two related JPA entities    stackoverflow.com

The scenario is as below (tables shown)

Delivery table
------
id  channelId   type
10  100         fax
20  200      ...

4. Why JPA entity class and its methods must not be declared final?    stackoverflow.com

I think that it makes sense for the entity variables to not be final as they are synchronized with the DB, but why for class and methods ??

5. Entity is not deployed    stackoverflow.com

I'm learning EJB now. When I deploy my project to glassfish server. One of my entity beans wasn't deployed. But the other 2 work properly. Here's the entity bean's code:

package com.supinfo.javapetstore.model;

import java.io.Serializable;
import ...

6. I can't use Entity Class (JPA) in Netbeans7.0    stackoverflow.com

I tried to use Entity Class (JPA) in Netbeans7.0 but It doesn't work.

  1. I create Enterprise Application name BookApp.
Create Entity Class
  1. I right click at BookApp-ejb and select Entity Classes fron Database.
  2. In dialog ...

7. when persisting an entity with auto generated PK in JPA    stackoverflow.com

@Id

@GeneratedValue(strategy = GenerationType.IDENTITY)

Column(name = "CNTNR_SHPMNT_NUM")

@XmlAttribute(name = "cntnrShpmntNum")

private Long cntnrShpmntNum;
I have a Table with name CNTNR and I made its primary key as generated with identity but its not working for me ...

8. EJB entity 3.0 vs Hibernate    coderanch.com

Ultra-high performance 1. Lazy initialization for collections for objects (uses runtime bytecode enhancement - no need to implement interfaces) 2. Outer join fetching to initialize a graph of associated objects in a single select (for databases with ANSI-style or Oracle-style outerjoins) 3. Batch fetching Association roles may be fetched predictively, by batch 4. Support for optimistic locking with versioning/timestamping Allows a ...





10. Entities EJB vs. Hibernate Framework    forum.hibernate.org

Since this Forum does not has a search engine I would appreciate if someone let me know wheter a thread like this has already been posted and its url. I built this thread to know all topics related with this comparison when implementing a DBAccess arch. What's better, why, which one do you recommend, and so on. Thanks.

11. begging for advice on best way to handle entities in ejb 3.0    forum.hibernate.org

Upgrading to ejb 3.0 from hibernate 3.0.2 and having many woes. First issue: Let's say I have a User object, who has a UserStatus, and many Roles. I load the User in one session to a form, it is submitted to be saved in another session. If i call em.merge(User), I get the TransientObjectException for the UserStatus. ok, makes sense, its ...

12. EJB3 entities - hibernate    forum.hibernate.org

Hi! I am using EJB3 persistence API's to create my entities ie JPA. However, I am not using the complete EJB3 architecture of session beans, entities etc. I want to use hibernate as my persistence provider. My client will be a standalone java program which will be calling my entities. Has anybody worked on this architecture? My doubt is: 1) I ...