maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: DAO injection in integration tests with a few database server specific methods
Date Sat, 24 Nov 2012 15:36:25 GMT

that *should* work as Hibernate Session would generate an List of Persisted NavbarLanguage
Classes (which your method returns) ..but...the generated Query would not be hinted..so optimizing
the query is not enabled
does anyone know to introduce Hints into Hibernate generated queries?
Martin 
______________________________________________ 
Place long winded disclaimer here > Date: Fri, 23 Nov 2012 01:55:57 -0800
> From: mittiprovence@yahoo.se
> To: users@maven.apache.org
> Subject: Re: DAO injection in integration tests with a few database server specific methods
> 
> Here is how I'm using the injected custom DAO bean method:
> 
> 	public List<NavbarLanguage> findWithNavbar(Navbar navbar) {
> 		if (navbarLanguageCustomDao != null) {
> 			return navbarLanguageCustomDao.findWithNavbar(navbar);
> 		} else {
> 			Criteria criteria = getSession().createCriteria(getPersistentClass());
> 			criteria.add(Restrictions.eq("navbar",
> navbar)).addOrder(Order.asc("languageCode"));
> 			return criteria.list();
> 		}
> 	}
> 
> Not sure if it's the best way to go though :-)
> 
> 
> 
> --
> View this message in context: http://maven.40175.n5.nabble.com/DAO-injection-in-integration-tests-with-a-few-database-server-specific-methods-tp5732576p5732611.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message