From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-26 13:30:52
|
[ http://216.121.112.228/browse/NH-2674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reassigned NH-2674: ------------------------------- Assignee: Fabio Maulo > QueryOver doesn't have support for entity-name > ---------------------------------------------- > > Key: NH-2674 > URL: http://216.121.112.228/browse/NH-2674 > Project: NHibernate > Issue Type: New Feature > Components: QueryOver > Affects Versions: 3.2.0Alpha2 > Reporter: Rostislav Pridatko > Assignee: Fabio Maulo > Priority: Minor > > We're currently using ICriteria in our project and we liked the new QueryOver syntax and want to use it throughout the project. Currently the main showstopper for us is the lack of support for entity-name in QueryOver. I've read the following discussion here: > https://groups.google.com/group/nhusers/browse_thread/thread/de9df28b4cb57985?pli=1 > and we have exactly the same situation in our project - we have one POCO class but several maps for it and we use entity-name to switch to a proper database table/view at run time. > I looked at the code in trunk of NHibernate and looks like adding support for entity-name in QueryOver should be pretty easy and should not affect existing code. > We'll just need to add one method overload to NHibernate.Impl.SessionImpl (and ISession): > public IQueryOver<T, T> QueryOver<T>(string entityName) where T : class > { > using (new SessionIdLoggingContext(SessionId)) > { > CheckAndUpdateSessionStatus(); > return new QueryOver<T, T>(new CriteriaImpl(entityName, this)); > } > } > and another one to NHibernate.Criterion.QueryOver: > public static QueryOver<T, T> Of<T>(string entityName) > { > return new QueryOver<T, T>(new CriteriaImpl(entityName, null)); > } > I may be missing something here; is this lack of support for entity-name in QueryOver an intentional decision or is it just something that no one ever got to due to lack of time? > Can I create and upload a patch or do I need some extra permissions here? > Sorry for bothering you with questions, couldn't find any FAQ or policy on how to contribute to the project. Thanks. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |