|Not able to get the inserted Entity after Query.getSingleResult(INSERT INTO..... VALUES......) [message #1067205]
||Sun, 07 July 2013 11:04
| Amrit Debasis
Registered: July 2013
Basically My requirement is to insert record into Oracle DB table, in which the PK column has to be filled by a SEQ.NEXTVAL|
I want to insert record by, Query query = entitymanager.createnativequery(INSERT stmt ).
To do the insertion, m using query.getSingleResult() to get the inserted record along with the PK (has been inserted by SEQ.NEXTVAL during insertion);
During the execution of query.getSingleResult() stmt, I can see the new record in DB,
But, in my application it gives me invalid sql stmt exception.
Please suggest me, whether m in the right track else let me know how can I get it resolved ?
Thanks in Advance.
Powered by FUDForum
. Page generated in 0.01925 seconds