From: NHibernate J. <mik...@us...> - 2006-11-13 18:04:05
|
[ http://jira.nhibernate.org/browse/NH-791?page=all ] Sergey Koshcheyev updated NH-791: --------------------------------- Fix Version: LATER Description: In order to easily accommodate custom collections NHibernate should offer an option to always wrap the collection instance from the target object. Basically when NHibernate creates a persistent collection from a transient collection it will take the existing collection and wrap it's own persistent collection type around that collection so that the user's collection still exists underneath and performs its own logic. Add a new configuration option to all collection types called always-wrap which has a type of true/false and defaults to false. When a new persistent object is loaded from the database for this type if always-wrap is true it will take the already created collection and wrap it with a new persistent collection instead of instantiating its own collection type which implements the same interface. As long as the user collection implements the correct ISet/IDictionary/IList interface the the user would be done adding their custom collection. For more information see the following post: http://forum.hibernate.org/viewtopic.php?t=966861 was: In order to easily accommodate custom collections NHibernate should offer an option to always wrap the collection instance from the target object. Basically when NHibernate creates a persistent collection from a transient collection it will take the existing collection and wrap it's own persistent collection type around that collection so that the user's collection still exists underneath and performs its own logic. Add a new configuration option to all collection types called always-wrap which has a type of true/false and defaults to false. When a new persistent object is loaded from the database for this type if always-wrap is true it will take the already created collection and wrap it with a new persistent collection instead of instantiating its own collection type which implements the same interface. As long as the user collection implements the correct ISet/IDictionary/IList interface the the user would be done adding their custom collection. For more information see the following post: http://forum.hibernate.org/viewtopic.php?t=966861 > Add always-wrap As a Configuration Option On Collections > -------------------------------------------------------- > > Key: NH-791 > URL: http://jira.nhibernate.org/browse/NH-791 > Project: NHibernate > Type: New Feature > Components: Core > Versions: 1.2.0.Beta2, 1.2.0.Alpha1, 1.2.0.Beta1 > Reporter: John Chapman > Priority: Minor > Fix For: LATER > > In order to easily accommodate custom collections NHibernate should offer an option to always wrap the collection instance from the target object. Basically when NHibernate creates a persistent collection from a transient collection it will take the existing collection and wrap it's own persistent collection type around that collection so that the user's collection still exists underneath and performs its own logic. > Add a new configuration option to all collection types called always-wrap which has a type of true/false and defaults to false. When a new persistent object is loaded from the database for this type if always-wrap is true it will take the already created collection and wrap it with a new persistent collection instead of instantiating its own collection type which implements the same interface. > As long as the user collection implements the correct ISet/IDictionary/IList interface the the user would be done adding their custom collection. > For more information see the following post: > http://forum.hibernate.org/viewtopic.php?t=966861 -- 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 |