well... configure the session factory is a joke... really.
Create your implementation of IHibernateConfiguration, inherit from
Configuration and then use DoConfigure(IHibernateConfiguration hc).
About "AutomatedDeveloper": somebody, someday, may see the light.
On 13 nov, 10:32, "David Mukaiwa" <
dmuka...@gmail.com> wrote:
> I've always wanted the ability to configure a sessionfactory without
> involving xml but the metamodel seemed to be too far beneath the surface for
> me to use comfortably. Most of the documentation I've read also makes no
> mention of it. I like the direction proposed by this discussion and I think
> a world of good will come out of it. Fabio's convention over configuration
> suggestion would push NH closer to becoming the 'silver bullet' that some
> fantasize ORM to be. A bit like Fabio's AutomatedDeveloper.
>
> On Thu, Nov 13, 2008 at 3:15 PM, Ayende Rahien <
aye...@ayende.com> wrote:
> > One of the reasons NOT to use XML is performance.NH has to do schema
> > validation on the XML, and that is EXPENSIVE!
>
> > On Thu, Nov 13, 2008 at 3:13 PM, Paul Batum <
paul.ba...@gmail.com> wrote:
>
> >> Well the point I was eluding to is that there might be a better way for us
> >> to approach our implementation and unit tests today, given that we would all
> >> love to give XML the boot.
>
> >> Imagine for a moment that someone creates a fork of NHibernate that uses a
> >> different format for describing mappings, and this fork becomes very popular
> >> and that we want to support it. One route I can imagine us going down is
> >> developing our own model for representing NHibernate mappings, and then
> >> implementing two mapping writers, one for each of the mapping formats.
> >> Basically this approach is about removing the Write() method from
> >> OneToManyPart and its ilk.
>
> >> Now if we started down this route today, we could write unit tests that
> >> confirm that the public api generates the correct model, and then if we ever
> >> ditched xml, those unit tests would stay. Thinking about it a little more, I
> >> suspect we wouldn't want to ditch xml completely - we would probably want to
> >> support xml AND whatever else nhibernate is prepared to accept.
>
> >> One could also make the argument that the proposed approach is just better
> >> in terms of seperation of concerns, and shoud be done anyway, even if the
> >> XML is here to stay.
>
> >> Thoughts?
>
> >> Paul Batum
>
> >> On Thu, Nov 13, 2008 at 9:35 PM, James Gregory <
jagregory....@gmail.com>wrote:
>
> >>> Indeed, but if it means no more XML then I don't see the problem. It's
> >>> all still up in the air yet anyway, so I don't think there's reason to be
> >>> concerned yet.
>
> >>> On Thu, Nov 13, 2008 at 9:31 AM, Paul Batum <
paul.ba...@gmail.com>wrote:
>
> >>>> Yes, but it means its a really significant rewrite, basically a
> >>>> redevelopment. We'd end up keeping the public API, and little else, and it
> >>>> would all have to happen in one go.
>
> >>>> On Thu, Nov 13, 2008 at 3:57 AM, James Gregory <
jagregory....@gmail.com
> >>>> > wrote:
>
> >>>>> We'd just have to rewrite the tests! :)
>
> >>>>> On Wed, Nov 12, 2008 at 1:53 PM, Paul Batum <
paul.ba...@gmail.com>wrote:
>
> >>>>>> So can I just ask for some clarification because there seemed to be
> >>>>>> conflicting answers... does the NHibernate trunk offer a configuration
> >>>>>> capability that looks like a viable alternative for us, instead of
> >>>>>> generating hbm xml? I would love to move away from generating xml BUT
> >>>>>> the vast majority of our unit tests assume we are generating xml! If
> >>>>>> we intend to change the mechanism we use to supply nhibernate with
> >>>>>> mappings at some point down the track, shouldn't we be worried about
> >>>>>> all those xml dependent unit tests?
>
> >>>>>> On Wed, Nov 12, 2008 at 5:03 AM, Fabio Maulo <
fabioma...@gmail.com>