Description

None

Environment

None

Activity

Show:

Max Rydahl Andersen August 4, 2006 at 10:42 AM

Two different issues, but both should be fixed in hibernate tools core now.

Max Rydahl Andersen August 3, 2006 at 10:25 PM

hehe yes, definitly misuse. willl need to find a way to detect it.

until then fix the misuse or generate code from the hbm.xml files

Lauri Vasko August 3, 2006 at 4:35 PM

two default constructors are generated in case when hibernate.reveng.xml defines generator class for tables' primary-key like so:

<hibernate-reverse-engineering>
<table name="SUBBJEKTIDE_SEOS">
<primary-key>
<generator
class="acme.TableNameSequenceGenerator">
</generator>
</primary-key>
</table>
</hibernate-reverse-engineering>

AND when you have composite-id for that table (*.hbm.xml wold look something like that):

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 3.08.2006 16:31:03 by Hibernate Tools 3.2.0.beta6a -->
<hibernate-mapping>
<class name="acme.SubjektideSeos"
table="SUBJEKTIDE_SEOS">
<composite-id name="id"
class="acme.SubjektideSeosId">
<key-many-to-one name="subjektideSeoseLiik"
class="acme.SubjektideSeoseLiik">
<column name="SUBJEKTIDE_SEOSE_LIIK_ID" precision="22"
scale="0" />
</key-many-to-one>
<key-many-to-one name="subjekt1"
class="acme.Subjekt">
<column name="SUBJEKT1_ID" precision="22" scale="0" />
</key-many-to-one>
<key-many-to-one name="subjekt2"
class="acme.Subjekt">
<column name="SUBJEKT2_ID" precision="22" scale="0" />
</key-many-to-one>
</composite-id>
<property name="ametikoht" type="string">
<column name="AMETIKOHT" length="100" />
</property>
</class>
</hibernate-mapping>

and version of Hibernate Tools is as shows the autogenerated comment 3.2.0.beta6a.

Indeed this is case of misuse, because there is no need to define generator for composite-id (at least one didn't get generated into hbm.xml – as you see above).

Nevertheless, misuse or not, Hibernate Tools should generate .java files that compile.

Something went wrong on our end

If this keeps happening, share this information with your admin, who should contact support.

Hash CVB40G

Details

Assignee

Unassigned

Reporter

shabs shabalot

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Lauri Vasko
Max Rydahl Andersen
shabs shabalot

Components

Fix versions

Affects versions

Priority

Minor