I had looked through hibernate-doc and searched topics..but no answer found
I'm crazy now thx for your reply
I have one sqlserver table with a TEXT type field and some other fields
when I want insert some rows into .....all fields successful,TEXT field expected
follow my source sorry for my pool English^_^
hbm.xml:
<property name="intro" type="text" update="true" insert="true">
<column name="intro" sql-type="text"/>
</property>
java code:
Code:
-*-part of sample app:-*-
sm.beginTransaction();
sm.session.save(sm.addCourse("1","test","TEXT HERE"));
sm.session.flush();
sm.endTransaction(true);
public Course addCourse(String id,String name,String intro)
{
Course course=new Course();
course.setId(id);
course.setName(name);
course.setIntro(intro);
return course;
}
-*-Course.java-*
package stu;
public class Course
{
private String id;
private String name;
private String intro;
public void setId(String string) {
id = string;
}
public String getId() {
return id;
}
public void setName(String name)
{
this.name=name;
}
public String getName()
{
return this.name;
}
public void setIntro(String intro)
{
this.intro=intro;
}
public String getIntro()
{
return this.intro;
}
}