I have a table serving as an association table, so the Id of the table is just the ids from the linked tables. The mapping file looks like:
<class name="UserPt" table="user_pt" >
<key-property name="userId" type="java.lang.Long" column="user_id"/>
<key-property name="ptId" type="java.lang.Long" column="pt_id"/>
And I need to run some HQL to insert the association into the table like:
INSERT INTO UserPt(userId, ptId) SELECT user.id, pt.id FROM...........
When I run this HQL, it gives an error saying:
"can only generate ids as part of bulk insert with either sequence or post-insert style generators".
I logged the bug in http://opensource.atlassian.com/projects/hibernate/browse/HHH-3400, but it is closed because I asked for a workaround. So this time I am not asking for anthing, just report the bug.
3.2.6GA, any database
is this issue ever going to be fixed or is there a reason why attached patch can't be applied?
Just moved to hibernate 3.6.4.Final and my patch appears to still fix my problem. Did I miss something with my solution?
I'll provide a patch file for this release.
Fixing this would also resolve HHH-4596.
Except for providing patches (thanks Graham!) and voting, what else can we do to get this issue resolved?
Thanks Andrei for the extra last mile and the other participants for your contributions. Sorry it took so long.
Bulk closing tickets resolved in released versions