Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Solving the problem indicated by @JB_Nizet I faced a new error about the validation.
- (Note: The problem of the space was a myeclipse bug. I tried with a project and it was myeclipse which added that evil space.) I added the following line to hibernate.cfg.xml and the problem was partly solved. The new error was (%%%% Error Creating SessionFactory %%%%
- org.hibernate.HibernateException: Error applying BeanValidation relational constraints)
- <property name="javax.persistence.validation.mode">none</property>
- The new error was hibernate sql query error. The id should have been assigned so I changed Hitest.hbm.xml to
- <?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
- <!--
- Mapping file autogenerated by MyEclipse Persistence Tools
- -->
- <hibernate-mapping>
- <class name="sor.hibernate.Hitest" table="hitest" catalog="test">
- <id name="id" type="java.lang.Integer">
- <column name="id" />
- <generator class="increment" />
- </id>
- <property name="greeting" type="java.lang.String">
- <column name="greeting" length="200" />
- </property>
- <property name="date" type="java.util.Date">
- <column name="date" length="10" />
- </property>
- <property name="ref" type="java.lang.Integer">
- <column name="ref" />
- </property>
- </class>
- </hibernate-mapping>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement