Cascade options missing #123

Closed
NOtherDev opened this Issue Jan 22, 2012 · 1 comment

2 participants

@NOtherDev

In Fluent NHibernate 1.3, CascadeExpression<TParent> 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<TParent>
{
    public CascadeExpression(TParent parent, Action<string> 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

@degert degert pushed a commit to degert/fluent-nhibernate that referenced this issue Jan 27, 2013
degert Quick fix for #123: Append cascade options instead of overwriting. 7dbcb7b
@chester89
Collaborator

Closed via 284 PR

@chester89 chester89 closed this Dec 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment