Environment: OS: Windows XP IDE: IBM Rational® Software Architect for WebSphere Software (Version: 8.0.3) WAS: 6.1 OpenJPA: 1.2.2
Thanks & Regards, Prabhat Sharma Onsite Technical Lead- RD Customer 3039 Cornwallis Road, Building 061, RTP,NC, 27709. Work: 9195330161, Email: prabhatsha...@in.ibm.com From: Prabhat Sharma2/India/IBM To: dev@openjpa.apache.org, dev-h...@openjpa.apache.org Cc: Umamaheswari Subramanian/India/IBM, Vasudevan Mogan/India/IBM@IBMIN, Ashish Nema1/India/IBM@IBMIN, Peri Sujata/India/IBM@IBMIN, Hariom Soni1/India/IBM@IBMIN Date: 03/05/2012 08:07 PM Subject: Critical issue (Blocker): missing fields in update statement Hello Team, We have some problem while updating an entity via entityManager's update method (generated by RSA8.0.3). Environment: OS: Windows XP IDE: IBM Rational® Software Architect for WebSphere Software (Version: 8.0.3) WAS: 6.1 This entity has around 66 fields and 42 ManyToOne & 4 OneToMany. relationships. While update, it is calling update for all relational entities. For one of the oneToMany relationship table KNA1 (attaching the entity), the update is not appending all fields of the entity and last field field value is appearing like " (null) null]". This entity has around 141 fields. Attaching the main entity (Knvv) which I am updating. [attachment "Knvv.java" deleted by Prabhat Sharma2/India/IBM] [attachment "KnvvPK.java" deleted by Prabhat Sharma2/India/IBM] Here is the entity which has OneToMany relationship. [attachment "Kna1.java" deleted by Prabhat Sharma2/India/IBM] [attachment "Kna1PK.java" deleted by Prabhat Sharma2/India/IBM] Attaching the error log. [attachment "ErrorLog.txt" deleted by Prabhat Sharma2/India/IBM] Attaching persistence.xml also. [attachment "persistence.xml" deleted by Prabhat Sharma2/India/IBM] Please help me resolving the issue. I am updating an entity by using the below entityManager: @Action(Action.ACTION_TYPE.UPDATE) public String updateKnvv(Knvv knvv) throws Exception { EntityManager em = getEntityManager(); try { em.getTransaction().begin(); knvv = em.merge(knvv); em.getTransaction().commit(); } catch (Exception ex) { try { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } } catch (Exception e) { ex.printStackTrace(); throw e; } throw ex; } finally { em.close(); } return ""; } Thanks & Regards, Prabhat Sharma Onsite Technical Lead- RD Customer 3039 Cornwallis Road, Building 061, RTP,NC, 27709. Work: 9195330161, Email: prabhatsha...@in.ibm.com