Thanks.

On Wed, May 4, 2011 at 11:09 AM, Luka <[email protected]> wrote:

> Hi, Fabio
> I have setup your tests and no exceptions are being thrown  for your
> tests but the expected ArgumentOutOfRangeException.
> I will try to isolate the entities and send you the domain that throws
> me InvalidOperationException.
>
> thanks
>
> On May 4, 3:00 pm, Fabio Maulo <[email protected]> wrote:
> > Luka,
> > Can you send me those classes and the mapping to recreate the
> > InvalidOperationException
> > ?
> >
> > I would prevent the case with a more descriptive exception about the
> > situation.
> > Thanks.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, May 4, 2011 at 8:17 AM, Luka <[email protected]> wrote:
> > > hi, Fabio
> >
> > > I have corrected my scenario like this:
> > > mapper.Class<Activity>(map =>
> > >                                       {
> > >                                        map.Discriminator(dm =>
> > >                                           {
> >
> > > dm.Column("DISCRIMINATOR_TYPE");
> >
> > > dm.Type(typeof(System.Int32));
> > >                                               dm.NotNullable(true);
> > >                                            });
> > >                                       });
> > >
> mapper.Subclass<FormActivity>(map=>map.DiscriminatorValue(ActivityType.Form
> > > ));
> >
> > > Now discriminator is not a Property anymore. But I get same error.
> >
> > > On May 4, 12:59 pm, Fabio Maulo <[email protected]> wrote:
> > > > The discriminator *can't* be a property.
> >
> > > > On Wed, May 4, 2011 at 6:18 AM, Luka <[email protected]> wrote:
> > > > > Hi,
> > > > > I have this scenarion:
> >
> > > > > A table:
> >
> > > > > Activity
> > > > > .Id : Guid
> > > > > .Type: int
> > > > > .Title: nvarchar(20)
> > > > > ...
> >
> > > > > Classes
> > > > > public class Activity: Entity
> > > > > {
> > > > >    public virtual ActivityType Type {get;set;}
> > > > >    public virtual string Title {get;set;}
> > > > > }
> >
> > > > > public class FormActivity: Activity
> > > > > {
> >
> > > > > }
> >
> > > > > and a mapping:
> > > > > mapper.Class<Activity>(map =>
> > > > >                                       {
> >
> > > > > map.Discriminator(dm=>dm.Column("TYPE"));
> > > > >                                       });
> >
> > >
> mapper.Subclass<FormActivity>(map=>map.DiscriminatorValue(ActivityType.Form
> > > ));
> >
> > > > > When building SessionFactory I get Exception
> >
> > > > > System.InvalidOperationException: Sequence contains more than one
> > > > > matching element
> > > > > It throws when get on this line:
> >
> > >
> mapper.Subclass<FormActivity>(map=>map.DiscriminatorValue(ActivityType.Form
> > > ));
> >
> > > > > what am I doing wrong?
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "nhusers" 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/nhusers?hl=en.
> >
> > > > --
> > > > Fabio Maulo
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "nhusers" 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/nhusers?hl=en.
> >
> > --
> > Fabio Maulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" 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/nhusers?hl=en.
>
>


-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to