This content has been marked as final.
Show 4 replies
-
1. Re: Need Help on JPA,Seam mutiple entity persistance
visumagic Nov 21, 2008 11:37 AM (in response to visumagic)As per my analysis , jpa is performing jdbc batch update, here it's trying to persist branches (which are linked to course) , but course is still not updated in db so it's not able to sync with db in the middle of transaction.
Is there any way to split control this batch update.please help me..
thanks
raghu -
2. Re: Need Help on JPA,Seam mutiple entity persistance
visumagic Nov 21, 2008 12:39 PM (in response to visumagic)the problem is
How do you retrieve an auto increment key after persisting to the database ?
if we use auto-increment id ,the id is not sync with database after persisting.
How to retrieve actual object is the problem. This is interesting scenario ,i never faced ,
if any one have similar experience , plz help me ..thanks
raghu -
3. Re: Need Help on JPA,Seam mutiple entity persistance
visumagic Nov 21, 2008 8:47 PM (in response to visumagic)Seam>Hibernate is not creating hibernate_sequences[sequence_next_hi_value, sequence_name]
table , because of this @GeneratedValue(strategy=GenerationType.TABLE) also not working in Seam.
please help me..
raghu -
4. Re: Need Help on JPA,Seam mutiple entity persistance
visumagic Nov 22, 2008 12:41 AM (in response to visumagic)Amazing discovery my me ..
Finally after a n number of frustrating hours,i^10 number of trails , I found the reason why it's failing ...
Even the reason is simple but,took much time ..
I'm not sure what i'm lagging - off , but simple point but pinch
Changes I have made :
1)Not removing auto_increment on primary key of two tables
otherwise:It will file with "Field 'id' doesn't have a default value"
2)moving annotation @GeneratedValue from id declaration to getter method
otherwise:Duplicate key or integrity constraint violation
3) For now I'm taking RESOURCE_LOCAL rather JTA in In persistance.xml
I felt that , I took much bcoz I'm really lacking of enough experience. In such cases I know only Trail and error method and getting help from forums ..
I feel happy if my post helps others,such that they wont wast time ..
thanks