If I have
[ActiveRecord]
public class Type1
{
...
[BelongsTo]
public Type2 Entity
{
get;
set;
}
}
[ActiveRecord]
public class Type2
{
...
[HasMany(Lazy = true)]
public IList<Type1> Entities
{
get;
set;
}
}
and I want to delete a Type2 without deleting the associated Type1s, but to
remove their reference to the Type2, is there a better way than saying
type2.Entities.Clear();
ActiveRecordMediator<Type2>.Update(type2);
ActiveRecordMediator<Type2>.Delete(type2);
Ideally I would like to do this without loading the collection, perhaps
there's some way to specify this in the attribute?
Thanks,
Adam.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---