Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Persistence.getPersistenceUtil (to find if associative entities are loaded)
Persistence.getPersistenceUtil [message #827345] Fri, 23 March 2012 03:45 Go to previous message
Mitesh Pandey is currently offline Mitesh Pandey
Messages: 7
Registered: March 2012
Junior Member
Hi,

I have an entity like below.The example is a generic one and not the actual code

@entity
public class company
{
@Id
private int companyId
@onetoMany
private list<employee> employee;
}

@entity
public class employee
{

}

My requirement is that for a given companyId , I should be able to find out that employee entity is null or not null

I googled and found that there exist a method Persistence.getPersistenceUtil helps in finding out the same requirement.

I am using JPA in JAVA SE environment with eclipselink 2.3.2 as JPA provider. Problem 1 : getPersistenceUtil method does not exist when i am trying to call it on persistence class.

Problem 2 : What are the different ways to find that for the entity, which are the associated entities that exist
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:Some Discriminator Values cause problem, while others do not
Next Topic:EclipseLink JPA: Composite Persistence Units Example
Goto Forum:
  


Current Time: Sun May 19 22:15:06 EDT 2013

Powered by FUDForum. Page generated in 0.01621 seconds