Ah, wouldn't it be great if you could simply define the entity and say to
some machine to generate class and mappings for you, using proven templates?

Oh look, that's the topic of this thread! ;)

        FB

> I read your line, is exactly like mine, with a different syntax. And I get
> the same design-time help that you did: intellisense and validation (I
just
> have to add the xsd to my solution)
> 
> And you're wrong: it's very easy to create incorrect mappings with FNH.
This
> is an example I've seen a thousand times:
> Class:
>   public AnotherEntity Reference {get;set;}
> Mapping:
>   Property(x => x.Reference);
> 
> There are TWO errors there. First, you have to use Reference (many-to-one
in
> xml) for many-to-one relationships, and the property is not virtual.
> Without the test, building the session factory will fail at runtime. What
> did FNH do for me here? Nothing that the xsd wouldn't have done.
> 
> If you don't like xml (hey - I'm not in love with it either, JSON/YAML
look
> beter; it just gets the job done), that's fine, but it's just a matter of
> taste. And you have to deal with all the renamed concepts whenever you ask
> for help, plus it does _not_ support everything that NH does.
> Just don't say it has an advantage over XML, because that's just not true.
> The only thing it does is check property names.
> 
> As for removing "layers"... well, you should STILL have tests in your
> solution, including at least one for each nontrivial query. If you think
> adding FNH will "free" you from that... well, that's just naive.
> For the record, I'm NOT saying tests are the solution to all your problems
> (they aren't). But NOT HAVING THEM is a much bigger problem.
> 
>     Diego
> 
> 
> 
> On Mon, Aug 16, 2010 at 20:41, cliff vaughn <[email protected]>
> wrote:
> 
> 
>       yes, i read it.  I simply provided an example of why I, and possibly
> others, use and like FNH.  Did you read my reply?  Did you look at my 1
line
> of the C# code segment versus the generated xml? With this, i really
> wouldn't need your "1 line long" test since this one line provides enough
> confidence that the xml is going to be correct without extra tests.  This
> simple line is one less thing that I have to worry about.  It reduces one
> less edge for me while I code.
> 
>       I know the edge, NH and xml, is still there since FNH still produces
> xml, but i at least I don't have to play around with xml.  If a user
didn't
> have tests, or even your "1 line long" test, that user could still be
fairly
> confident that this middle layer is producing the correct xml.  I hope you
> can see the use case for FNH even if you don't agree with it.  Some
people,
> like myself, like to remove some layers even if it means I add others.
It's
> no different than using VisualStudio versus Notepad or NCommon versus
> straight NH or some other tools.  You're comfortable with playing around
in
> the xml, I don't see the need nor do i want to be bothered with it.
> 
>       There's no right or wrong and no real need to continue beating this,
> IMHO, dead horse. <http://www.goenglish.com/BeatADeadHorse.asp>
> 
>       cliff
> 
> 
>       On Mon, Aug 16, 2010 at 7:07 PM, Diego Mijelshon
> <[email protected]> wrote:
>       > Did you read the part of my email that you left out?
>       > The test is already there. It's 1 line long. I don't have to do
> _anything_
>       > To rename, I press Ctrl-R+R, and it will find both code and XML
> references.
>       >
>       >     Diego
>       >
>       >
>       > On Mon, Aug 16, 2010 at 19:39, cliff vaughn
> <[email protected]>
>       > wrote:
>       >>
>       >> Diego
>       >>
>       >> On Mon, Aug 16, 2010 at 3:52 PM, Diego Mijelshon
> <[email protected]>
>       >> wrote:
>       >> > If anyone can tell me how using FNH will provide more
validation
> than
>       >> > that,
>       >> > I'll start using it now :-)
>       >> > Moreover, why do some people think that this:
>       >> >   Property(x => x.TheData).Column("the_data");
>       >> > is "safer" or "more static" (?) than:
>       >> >   <property name="TheData" column="the_data"/>
>       >> > ...considering the former just produces the latter?
>       >>
>       >> If i don't have to change column names, and I almost never do,
the
>       >> benefit for me is I can write just
>       >>
>       >> Property( x=>x.TheData)
>       >>
>       >> and know 100% that this is going to work due to the compile time
>       >> checks.  I don't need a test to validate, although i'm sure i'll
> them.
>       >>  This is a lot more refactoring friendly with just VS.
>       >>
>       >> --
>       >> thanks
>       >>
>       >> cliff
>       >>
>       >> --
>       >> 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]
> <mailto:nhusers%[email protected]> .
>       >> For more options, visit this group at
>       >> http://groups.google.com/group/nhusers?hl=en.
>       >>
>       >
>       > --
>       > 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]
> <mailto:nhusers%[email protected]> .
>       > For more options, visit this group at
>       > http://groups.google.com/group/nhusers?hl=en.
>       >
> 
> 
> 
> 
>       --
> 
>       thanks
> 
>       cliff
> 
> 
> 
> 
> 
>       --
>       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]
> <mailto:nhusers%[email protected]> .
>       For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
> 
> 
> 
> --
> 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.


-- 
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