[hibernate-commits] Hibernate SVN: r11550 - trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/entity.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Tue May 22 15:23:09 EDT 2007
Author: epbernard
Date: 2007-05-22 15:23:09 -0400 (Tue, 22 May 2007)
New Revision: 11550
Modified:
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/entity/Java5FeaturesTest.java
Log:
Mote tests on setParameter and Enums
Modified: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/entity/Java5FeaturesTest.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/entity/Java5FeaturesTest.java 2007-05-22 19:17:49 UTC (rev 11549)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/entity/Java5FeaturesTest.java 2007-05-22 19:23:09 UTC (rev 11550)
@@ -58,6 +58,16 @@
//testing constant value
assertEquals( Starred.OK, bid.getNote() );
assertEquals( Starred.GOOD, bid.getEditorsNote() );
+ bid = (Bid)s.createQuery( "select b from Bid b where b.note = :note" +
+ " and b.editorsNote = :editorNote " +
+ " and b.id = :id")
+ .setParameter( "id", bid.getId() )
+ .setParameter( "note", Starred.OK )
+ .setParameter( "editorNote", Starred.GOOD )
+ .uniqueResult();
+ //testing constant value
+ assertEquals( Starred.OK, bid.getNote() );
+ assertEquals( Starred.GOOD, bid.getEditorsNote() );
bid.setNote( null );
tx.commit();
s.clear();
More information about the hibernate-commits
mailing list