From: NHibernate J. <mik...@us...> - 2006-11-13 18:03:17
|
[ http://jira.nhibernate.org/browse/NH-805?page=comments#action_14352 ] Franz Meier commented on NH-805: -------------------------------- I hope to see this feature soon, because i often want to fetch objects different according to my use (business) cases. The fetching strategy that is configured in the xml file seems to be ignored from nhibernate (especially when using CreateQuery). It also looks like SetFetchMode in IQuery is ignored. I pretty like nhibernate, but in a lot of my business cases i have no idea what hibernate is doing in the background and so the performance is poor. > A Function for setting the Fetch strategy on an Object > ------------------------------------------------------ > > Key: NH-805 > URL: http://jira.nhibernate.org/browse/NH-805 > Project: NHibernate > Type: New Feature > Components: Core > Versions: 1.2.0.Beta2 > Reporter: Franz Meier > > and a function to query collection later by specifying a fetching strategy > sample: > class User > { > string username; > Ilist UserGroups; > } > class UserGroup > { > User user; > Group group; > ... > } > class Group > { > string groupname; > IList UserGroups; > } > User user = session.Load<User>(1); > session.SetFetchingStrategy(user, "UserGroups", Strategy.Select) > session.SetFetchingStrategy(user, "UserGroups.group", Strategy.Join) > session.FetchCollection(user, "UserGroups"); // this funktion would the init the collection > // of the specified user object by using my defined fetching strategy > It think all funktion are available in the nhibernate core, somebody should only write > the funktions -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |