Hi everybody,
We are using NH+Castle+uNhaddins. The models are registered on the
container like:
----------------------
IEnumerable<Type> models = typeof
(Product).Assembly.GetTypes()
.Where(t => t.GetInterfaces
().Any(i => i == typeof(IModel)));
foreach (Type impl in models)
container.Register(Component.For
(impl).LifeStyle.Transient);
---------------------
When the container resolves a component which has a reference to
another component, the refenced component is also resolved. I know
that is the default behavior.
With our current nh configuration, it will throw an exception when it
tries to save a component whose dependecy property is not a null
object (object references an unsaved transient instance - save the
transient instance before flushing).
To avoid this situation, after resolving the instance, the instance
properties must be set to null, every time an instance is resolved to
be saved.
---------------------
We would like to configure the container "on a elegant mode" in order
these properties of the resolved instances can be automatically null,
in order not to do the mentioned action.
Any hints about how to achieve it.
Many thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---