openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chintan4181 <chintan4...@gmail.com>
Subject Re: may be OpenJPA limitation
Date Thu, 09 Jun 2011 18:39:19 GMT
Here is code snippet

@Entity
@Table(schema="DBSCHEMA")
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="USER_ID")
	private long userId;

	@Column(name="AUDIT_LDAP_DN")
	private String auditLdapDn;

	@Column(name="AUDIT_TIMESTAMP")
	private Timestamp auditTimestamp;

	@Column(name="AUDIT_USER")
	private String auditUser;


in my DAO class i am using below code
LOG.info("before find");
			Long key = new Long("2");
			User user = em2.find(User.class, key);
			LOG.info("user last name " + user.getLastName());
			user.setLastName("Jorden");
			em2.merge(user);

persistent.xml has following entry
<persistence-unit name="MIApplicationJPADB2" transaction-type="JTA">
		<description>MIApplication Datasource DB2</description>
		<jta-data-source>jdbc/MIApplicationDSDB2</jta-data-source>
		<class>com.pmigroup.origination.miapplication.jpa.entities.User</class>
		<properties>
			<property name="openjpa.Log" value="SQL=TRACE,JDBC=TRACE" />
		</properties>
	</persistence-unit>

Let me know this much information is fine.

thanks
chintan

--
View this message in context: http://openjpa.208410.n2.nabble.com/may-be-OpenJPA-limitation-tp6450246p6459132.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message