I am trying to use IDENTITY key generator but I am getting the follow error.
Do I need to set a data type for the INDENTITY key generator? I looked at
the 1.01 code and Integer is supported. Am I missing something?
Error
-----------------------------------------------------------------------------------
0 [main] FATAL engine.BaseFactory - A fatal exception occurred:
org.exolab.cast
or.mapping.MappingException: Key generator
org.exolab.castor.jdo.keygen.Identity
KeyGenerator doesnt support SQL type {1}.
Here is a sample test case.
SQL
----------------------------------------
create table my_class (
id int not null primary key generated by default as identity ,
string_value varchar(200) not null
) ;
mapping
------------------------------------------
<class name="test.MyClass" identity="id" key-generator="IDENTITY">
<map-to xml="my-class" table="my_class"/>
<field name="id" type="integer">
<bind-xml transient="true"/>
<sql name="id" type="integer"/>
</field>
Steve
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email