Status: Closed (View Workflow)
Affects Version/s: 4.3 CP05 CR1
Fix Version/s: FUTURE
Hibernate 3.2.6GA, Oracle 10g
Release Notes Text:RE:
JBPAPP-4599, issue was fixed in EAP 4.3.0.GA_CP09, brought into SOA4.3.0CP5. So Closed.
org.hibernate.id.enhanced.TableGenerator always throws the following exception if I want to save a new object to Oracle:
java.lang.IllegalArgumentException: alias not found: tbl
I attach an example to this case. The example is loosely based on the tutorial example, that comes with Hibernate. It contains a Person object that is saved to db using the enhanced.TableGenerator as id generator. To keep the zip small only the jars of jdbc driver are included, the jars needed from hibernate distribution are listed in lib/readme.txt.
The zip also contains a modified TableGenerator that works with Oracle. This version was made by forum user stomp and more information about it can be read here: http://forum.hibernate.org/viewtopic.php?t=980933
It changes the 194th row of TableGenerator from
this.query = dialect.applyLocksToSql( query, lockMap, CollectionHelper.EMPTY_MAP );
this.query = dialect.applyLocksToSql( query, lockMap, Collections.singletonMap("tbl", new String