What is the type of MDSId?
What is the type of the value generated by the db?
How the MDSId is mapped?
I see what you are saying but ...
mDSId is Long and the identity column (mDSId) is NUMERIC (8). In my standardjbosscmp the mapping is:
I also tried to add on my jbosscmp-jdbc.xml
but get a nasty warning @ deploy time:
13:46:08,123 WARN [JDBCMappingMetaData] Unrecognized jdbc-type: type type="NUMERIC", using Types.OTHER
java.lang.NoSuchFieldException: type type="NUMERIC"
Apologies, forget the part about the last Exception, that was a typo in my XDoclet tags.
*@jboss.sql-type type type="NUMERIC"
Oooops :) Thanks to your hint I also solved the issue of the ClassCastException! The problem was on JDBCCreateEntityCommand for Sybase that I made that was doing:
JDBCCMPFieldBridge cmpField = (JDBCCMPFieldBridge)iter.next();
where pk was an Object as opposed to Long. Shall I update the patch I made for Sybase?
Yes, please, update the patch.
I didn't get the exact reason of failure though.
pk vas type Object in the plugin code but actually on my bean is declared to be Long therefore the ClassCastException.
I will update the patch.
I too am working to enable auto-incremented keys in Sybase. Did someone already get this working?