ITeye博客

Hibernate

共 3 篇文章

[Hibernate] one cause of LazyInitializationException

Sometimes a LazyInitializationException will be thrown on getHibernateTemplate().load(). Reason being when using load(), Hibernate simply retrieves you a Proxy, which has only the id set, rest of the fields being queried from database when needed. At that time, the hibernate session might have been…

2010-10-19 16:08 · Hibernate · REST · Hibernate

[Hibernate 3] Index not created by SchemaUpdate

A normal index like the one below won't get created automatically if hibernate.hbm2ddl.auto is set to [b]update[/b]. [code="xml"] [/code] If the property is a primary key or it's unique, the index will be created, however. It's a hibernate bug reported here: [url]http://opensource.atlassian.com/pro…

2009-09-30 16:55 · Hibernate · UP · XML · Hibernate · OpenSource

[Hibernate 3] bug about string "call"

Once there's a string "call" involved in an hql, hibernate will throw an exception like the one below: HibernateSystemException: ordinal parameter mismatch This is an open bug reported here: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1423 A simple workaround is to make the 'call'…

2009-09-01 18:56 · Hibernate · Java · Hibernate · OpenSource