I'll start with re-implementing Peter's use case in a test fixture and see
how it works.
Alex
--
Alexander Groß
http://therightstuff.de/
| nhibernate+...@googlegroups.com.
| > For more options, visit this group at
| http://groups.google.com/group/fluent-nhibernate?hl=en.
| >
| >
| >
|
| --
|
| You received this message because you are subscribed to the Google Groups
| "Fluent NHibernate" group.
| To post to this group, send email to fluent-n...@googlegroups.com.
| To unsubscribe from this group, send email to fluent-
| nhibernate+...@googlegroups.com.
Paul, I think we should rename the PersistenceSpecification's extension
methods to match their semantics (or add new ones).
Alex
--
Alexander Groß
http://therightstuff.de/
| -----Original Message-----
| From: fluent-n...@googlegroups.com [mailto:fluent-
| nhibe...@googlegroups.com] On Behalf Of Paul Batum
| Sent: Wednesday, December 16, 2009 10:25 PM
| To: fluent-n...@googlegroups.com
| Subject: Re: [fluent-nhib] Re: Unit testing an inverse one-to-many
|
| nhibernate+...@googlegroups.com.
| > For more options, visit this group at
| http://groups.google.com/group/fluent-nhibernate?hl=en.
| >
| >
| >
|
| --
|
| You received this message because you are subscribed to the Google Groups
| "Fluent NHibernate" group.
| To post to this group, send email to fluent-n...@googlegroups.com.
| To unsubscribe from this group, send email to fluent-
| nhibernate+...@googlegroups.com.
> > | nhibernate+...@googlegroups.com<nhibernate%2Bunsubscribe@googlegrou ps.com>
> > .
> > | > For more options, visit this group at
> > |http://groups.google.com/group/fluent-nhibernate?hl=en.
> > | >
> > | >
> > | >
> > |
> > | --
> > |
> > | You received this message because you are subscribed to the Google Groups
> > | "Fluent NHibernate" group.
> > | To post to this group, send email to fluent-n...@googlegroups.com.
> > | To unsubscribe from this group, send email to fluent-
> > | nhibernate+...@googlegroups.com<nhibernate%2Bunsubscribe@googlegrou ps.com>
This code never calls action delegate specified in CheckList. I debug
it and it never gets called.
var project = Session.CreateCriteria(typeof (MetaProject))
.List<MetaProject>().First();
MetaPackage metaPackage1 =project.CreateMetaPackage
("Name1");
metaPackage1.Description = "Description";
MetaPackage metaPackage2 = project.CreateMetaPackage
("Name2");
metaPackage2.Description = "Description";
var packages = new List<MetaPackage>() {metaPackage1,
metaPackage2};
var ps = new PersistenceSpecification<MetaProject>
(Session);
ps.CheckProperty(x => x.Name, "Name")
.CheckProperty(x => x.Description, "Description")
.CheckList(x => x.MetaPackages, packages, (x,p)=>
x.MetaPackages_Add(p))
.VerifyTheMappings();
Can you please provide a failing test for your scenario, like this one:
http://github.com/agross/fluent-nhibernate/blob/master/src/FluentNHibernate.
Testing/DomainModel/InverseOneToManyTester.cs
Thanks,
| > > > | nhibernate+@googlegrou ps.com>
| > > > .
| > > > | > For more options, visit this group at
| > > > |http://groups.google.com/group/fluent-nhibernate?hl=en.
| > > > | >
| > > > | >
| > > > | >
| > > > |
| > > > | --
| > > > |
| > > > | You received this message because you are subscribed to the
| > > > | Google Groups "Fluent NHibernate" group.
| > > > | To post to this group, send email to fluent-
| > > > | To unsubscribe from this group, send email to fluent-
| > > > |
| nhibernate+...@googlegroups.com<nhibernate%2Bunsubscribe
| > > > | nhibernate+@googlegrou ps.com>
| > > > .
| > > > | For more options, visit this group at
| > > >http://groups.google.com/group/fluent-
| > > > | nhibernate?hl=en.
| > > > |
| > > > |
|
| --
|
| You received this message because you are subscribed to the Google Groups
| "Fluent NHibernate" group.
| To post to this group, send email to fluent-n...@googlegroups.com.
| To unsubscribe from this group, send email to fluent-
| nhibernate+...@googlegroups.com.
Sorry I haven't replied sooner - I assumed I would get email
notifications about replies to this post and kind of forgot about it.
Many thanks for pointing out CheckComponentList, it's nice to have a
simple fix.
P
On Jan 1, 12:34 pm, Alexander Groß <agr...@therightstuff.de> wrote:
> epitka,
>
> Can you please provide a failing test for your scenario, like this one:http://github.com/agross/fluent-nhibernate/blob/master/src/FluentNHib....
> Testing/DomainModel/InverseOneToManyTester.cs
>
> Thanks,
> Alex
> --
> Alexander Großhttp://therightstuff.de/
> smime.p7s
> 9KViewDownload