Joined: Fri Nov 24, 2006 3:48 am Posts: 1
|
I create myClass.
MyClass.java
public class MyClass{
private Long id;
private String from;
public Department() { }
public Department(String from) {
this.from = from;
}
public Long getId() { return id; }
public void setId(Long id) { this.id = id;}
public String getFrom() { return from; }
public void setFrom(String name) { this.from = From; }
}
file mapping: MyClass.bhm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="model">
<class name="MyClass">
<id name="id">
<generator class="native"/>
</id>
<property name="from"/>
</class>
</hibernate-mapping>
I test this object(MyClass). Hibernate throws Error.
If I change field "from" to other field.
for example: name.
I run OK.
summary:
I create my class with field: from, where... there are query word.
Hibernate is error.
|
|