Another use case (mine) is where you are implimenting FluentNHibernate
in a larger corporate environment.  We have vendors of black box
products that expose certain API's only as stored procedures.  There
really isn't an option to change this (multi million $ investment) so
we have to make do.

I want to use FluentNHibernate for all our custom development and it
would be nice to have all the same benifits when we need to interface
with our vendor systems.  Right now I could get by with HBM files but
it sucks having to deal with this scenario in special way.

How much work will this be to implement?  If somebody could point me
in the right direction I will be happy to do the grunt work.

On Dec 26 2008, 5:14 pm, Jimit <jimitndi...@gmail.com> wrote:
> One use case that comes to mind is havingstoredproceduresthat
> implement full-text search. Those are the onlystoredprocedureswe've
> got in my current project - everything else uses the orm.
>
> Chad Myers wrote:
> > It's certainly lower priority, I'll give you that.
>
> > But usingstoredprocedureswith NHibernate has some friction and opportunity 
> > for typos, misnaming, etc, so I think there's value that FN could add here 
> > somehow to help reduce typos and such.
>
> > -c
>
> > ________________________________
>
> > From: fluent-nhibernate@googlegroups.com on behalf of Ayende Rahien
> > Sent: Tue 12/23/2008 9:49 AM
> > To: fluent-nhibernate@googlegroups.com
> > Subject: [fluent-nhib] Re:StoredProcedure automapping
>
> > Why?
> > This is certainly not something that can be called fluent. You allow to mix 
> > & match xml & fluent config anyway.
> > I would say that this should be out of scope for FN
>
> > On Tue, Dec 23, 2008 at 4:49 PM, Chad Myers <c...@chadmyers.com> wrote:
>
> >    Hey now, there are a few reasons you might use an sp with nhib. And 
> > anyhow, nhib supports it, so should we.
>
> >    ----------------------
> >    Sent from my phone.  Please excuse typos and extra characters
>
> >    -----Original Message-----
> >    From: Paul Batum <paul.ba...@gmail.com>
> >    Sent: Tuesday, December 23, 2008 3:48 AM
> >    To: fluent-nhibernate@googlegroups.com 
> > <fluent-nhibernate@googlegroups.com>
> >    Subject: [fluent-nhib] Re:StoredProcedure automapping
>
> >    Ahh I see. That looks ok.
>
> >    Of course, it won't protect you from changes made on the SP side, but 
> > thats
> >    one of the many reasons why we both hate SP's, isnt it!
>
> >    On Tue, Dec 23, 2008 at 8:40 PM, James Gregory <jagregory.com 
> > <http://jagregory.com/> @gmail.com <http://gmail.com/> >wrote:
>
> >    > Chris, really, why would you want to usestoredproceduresin NHibernate?
> >    > @Paul: I'd say the return-property element could be mapped using
> >    > expressions.
>
> >    > Something along the lines of:
>
> >    > class EmploymentMap : ClassMap<Employment>
> >    > {
> >    >   public EmploymentMap()
> >    >   {
> >    >     Map(x => x.Employee);
> >    >     Map(x => x.Employer);
>
> >    >     SqlQuery("selectAllEmployments_SP", sql =>
> >    >     {
> >    >       sql.Return
> >    >         .Property(x => x.Employee, "EMPLOYEE")
> >    >         .Property(x => x.Employer, "EMPLOYER");
>
> >    >       sql.Text = "exec selectAllEmployments";
> >    >     });
> >    >   }
> >    > }
>
> >    > It's not brilliant, but it wouldn't break with renaming of properties. 
> > I vehemously
> >    > oppose usingstoredprocedures, but this feature can also be applied to
> >    > performance tweaked sql queries, so it's probably something we should 
> > pursue
> >    > at some point.
>
> >    > On Tue, Dec 23, 2008 at 3:47 AM, Paul Batum <paul.ba...@gmail.com> 
> > wrote:
>
> >    >> It looks like its all strings and none of it would be derivable from 
> > the
> >    >> domain model. I'm struggling to imagine an API that would be worth 
> > it. Did
> >    >> you have any ideas?
>
> >    >> On Tue, Dec 23, 2008 at 10:52 AM, Chris Marisic 
> > <chrismari...@hotmail.com
> >    >> > wrote:
>
> >    >>> This is a mapping I found quick online
>
> >    >>>    <sql-query name="selectAllEmployments_SP">
> >    >>>        <return alias="emp" class="Employment">
> >    >>>            <return-property name="employee" column="EMPLOYEE"/>
> >    >>>            <return-property name="employer" column="EMPLOYER"/>
> >    >>>            <return-property name="startDate" column="STARTDATE"/>
> >    >>>            <return-property name="endDate" column="ENDDATE"/>
> >    >>>            <return-property name="regionCode" column="REGIONCODE"/>
> >    >>>            <return-property name="id" column="EID"/>
> >    >>>            <return-property name="salary">
> >    >>>                <return-column name="VALUE"/>
> >    >>>                <return-column name="CURRENCY"/>
> >    >>>            </return-property>
> >    >>>        </return>
> >    >>>        exec selectAllEmployments
> >    >>>    </sql-query>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to