-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: net.sf.hibernate.dialect.SybaseAnywhereDialect
PostPosted: Tue Feb 15, 2005 4:07 pm 
Newbie

Joined: Tue Aug 03, 2004 12:18 pm
Posts: 11
There seems to be a problem with this dialect and using native id generator.

I have a table that has a PK column defined as:

I_SECURITY_LOG_ID Integer NOT NULL AUTOINCREMENT

in my Pojo I define the hibernate mapping using XDoclet as

private int id;

/**
*@hibernate.id column="I_SECURITY_LOG_ID" generator-class = "native"
*/
public int getId()
{
return id;
}

When I create a new Pojo, set all of it's attributes, and then call saveOrUpdate(pojo), I get a prepared statement exception saying "Column '@p0' not found".

If I change the Pojo to use my own key generator class and not have the database autoincrement, then it works fine.

I can trace all the way to the execution of the prepared statement, and if I run the same statement externally using ISQL and inserting the variables manually, both the insert and the select @@identity seem to work fine.

My only conclusion is that there is something going on inside the Dialect that I can't see that isn't working correctly. I could be wrong... :-) BTW, the database version is Sybase AnyWhere version 7.x I am currently unable to confirm it with Sybase Anywhere 9.x as I don't have version 9.x available to test.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.