jagregory/fluent-nhibernate — Issue #123: Cascade options missing
Author: NOtherDev
Created: 2012-01-22 18:44:31+00:00
State: open

In Fluent NHibernate 1.3, `CascadeExpression` class is missing some of available cascade options, as well it doesn't allow to select multiple options.

Options available in Fluent NHibernate:

public class CascadeExpression
{
public CascadeExpression(TParent parent, Action setter);
public TParent All();
public TParent None();
public TParent SaveUpdate();
public TParent Delete();
}

Options available in NHibernate (note also `Flags` attribute, allowing to choose multiple options):

[Flags]
public enum Cascade
{
None = 0, // none
Persist = 2, // save-update, persist
Refresh = 4, // refresh
Merge = 8, // merge
Remove = 16, // delete
Detach = 32, // evict
ReAttach = 64, // lock
DeleteOrphans = 128, // delete-orphans
All = 256, // all
}

See also: http://notherdev.blogspot.com/2012/01/mapping-by-code-set-and-bag.html