I am having problem inserting (session.persist(object)) a column with large text. However, if I insert it without value (or small text) in that column and then update it, it works fine.
Why is large text works during update but not insert?
Note: The column type in question is "text".
Thanks.
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2
Mapping documents:http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
could not insert: [test]
Name and version of the database you are using: Sybase Adaptive Server Enterprise/15.0.1
The generated SQL (show_sql=true):
insert into test (name, description) values(?,?)
Debug level Hibernate log excerpt:
Oct 2, 2007 00:00:00 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: JZ0NK
Oct 2, 2007 00:00:00 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: JZ0NK: Generated keys are not available because either the Statement.NO_GENERATED_KEYS was used or no keys were automatically generated.
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html