[
http://jira.jboss.com/jira/browse/JBAS-5105?page=comments#action_12394311 ]
Alexey Loubyansky commented on JBAS-5105:
-----------------------------------------
I checked PostgreSQL's docs and now I see what you were talking about. I was confused
by how the sequence is used in this case. Yes, it should call nextval() instead of
currval(). What don't you like about this approach?
We have to get the id after ejbCreate returns and before ejbPostCreate is invoked. So
either we have to
- INSERT with RETURNING or call currval() after INSERT in ejbCreate
- or call nextval() and then INSERT sometime later (after ejbCreate/ejbPostCreate)
In the later case we would support non-null foreign keys while in the first one we
wouldn't.
PostgreSQL Entity Command for jdbc2pm is Not Working Properly
-------------------------------------------------------------
Key: JBAS-5105
URL:
http://jira.jboss.com/jira/browse/JBAS-5105
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: CMP service
Affects Versions: JBossAS-4.2.2.GA
Environment: PostgreSQL 8.2, Windows XP Pro
Reporter: Dr. Richard Li
Assigned To: Alexey Loubyansky
Priority: Critical
Attachments: PSQLEntityCommandTest.zip, server.log, server.log
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira