Another related question is how to state Hibernate queries depending on Generics. For instance, you would like to state a generic query in ConfirmDetailsDaoHibernate:
public List<T> findAllOrderByAlpha() { return getHibernateTemplate().find( "from ConfirmDetails c order by c.name"); } Well, this HQL is wrong, because it will return all ConfirmDetails and not only those of some sub type of ConfirmDetails. That is, this query commits to ConfirmDetails and is not generic. So, how to write generic queries in a formlike: "from T c order by c.name", T); with T the type of the class. T could be ConfirmDetails or ServiceProviderConfirmDetails. Any idea? -- View this message in context: http://www.nabble.com/GenericDao-and-Class-Hierarchy---Approach--tp14672300s2369p19253671.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]