Problem seems to be with Ant 1.6 and Hibernate 2.1.6 when I try to create a schema in the part where <generator class="native"/>. It doesn't have to be native, what else can I substitute?
Hibernate version: 2.1.6
Mapping documents:
<hibernate-mapping>
<class name="com.oreilly.hh.Album" table="ALBUM">
<meta attribute="class-description">
Represents an album in the music database, an organized list of tracks.
@author Jim Elliott (with help from Hibernate)
</meta>
<id name="id" type="int" column="ALBUM_ID">
<meta attribute="scope-set">protected</meta>
<generator class="native"/>
</id>
<property name="title" type="string">
<meta attribute="use-in-tostring">true</meta>
<column name="TITLE" not-null="true" index="ALBUM_TITLE"/>
</property>
<property name="numDiscs" type="integer"/>
<set name="artists" table="ALBUM_ARTISTS">
<key column="ALBUM_ID"/>
<many-to-many class="com.oreilly.hh.Artist" column="ARTIST_ID"/>
</set>
<set name="comments" table="ALBUM_COMMENTS">
<key column="ALBUM_ID"/>
<element column="COMMENT" type="string"/>
</set>
<list name="tracks" table="ALBUM_TRACKS" cascade="all">
<meta attribute="use-in-tostring">true</meta>
<key column="ALBUM_ID"/>
<index column="POS"/>
<composite-element class="com.oreilly.hh.AlbumTrack">
<many-to-one name="track" class="com.oreilly.hh.Track" cascade="all">
<meta attribute="use-in-tostring">true</meta>
<column name="TRACK_ID"/>
</many-to-one>
<property name="disc" type="integer"/>
<property name="positionOnDisc" type="integer"/>
</composite-element>
</list>
<property name="added" type="date">
<meta attribute="field-description">When the album was created</meta>
</property>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
[schemaexport] DEBUG [main] (SchemaExport.java:149) - create table ALBUM (
[schemaexport] ALBUM_ID integer generated by default as identity (start with 1),
[schemaexport] TITLE varchar(255) not null,
[schemaexport] numDiscs integer,
[schemaexport] added date
[schemaexport] )
[schemaexport] ERROR [main] (SchemaExport.java:154) - Unsuccessful: create table ALBUM (AL
BUM_ID integer generated by default as identity (start with 1), TITLE varchar(255) not nul
l, numDiscs integer, added date)
Name and version of the database you are using:
MySQL 4.017
|