openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adil <>
Subject Re: Null field not persisted for Dates
Date Tue, 13 May 2014 17:40:49 GMT

I have tried <property name="openjpa.DetachState" 
value="fetch-groups"/>  and it worked fine. but the problem is if i want to
update on field, for that in persistenceObject i populate one field, rest
are null. it will cause problem. Do we have any solution to apply this
behavior on specific field instead of complete JPA entities.

I have tried below code but didn't work for me(persistence.xml
openjpa.DetachState property was not set for below code).

	@FetchGroup(name="employeeDateFetchGroup", attributes={
class Employee{

and Persistence DAO Layer code:

*Query query = entityManager.createQuery(EMPLOYEE_RETRIEVE_SQL);
			query.setParameter("employeeId", identifier);		
			OpenJPAQuery kq = OpenJPAPersistence.cast(query);
			persistentObject = (AppliedFirearmPO)kq.getSingleResult();*

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message