[fluent-nhib] Re: In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread C+++
ok, I admit, a little bit :D On Tue, Feb 17, 2009 at 11:59 PM, James Gregory wrote: > That looks a little bit involved for my liking... ;) > Applied, thanks! > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Flue

[fluent-nhib] Re: Bug with CustomType in a Component?

2009-02-17 Thread Brendan Erwin
Heh, talking to myself here. :) Anyway, I put this issue in the tracker and attached the patch there too. http://code.google.com/p/fluent-nhibernate/issues/detail?id=117 On Feb 17, 2009, at 10:44 PM, Brendan Erwin wrote: > Here is a patch that adds IProperty.HasAlterationFrom and modifies

[fluent-nhib] a patch for configuring nh2.1's proxyfactory.factory_class setting

2009-02-17 Thread Karron Qiu
proxyfactory.factory_class is a mandatory configuration in nh2.1 trunk version. I create a patch to configure this setting. Please have a look it. Thanks. By the way, I consider if we should set a default value for it when fluent nh supports nh2.1, such as "NHibernate.ByteCode.Castle.ProxyFactoryF

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread Karron Qiu
Here is my patch for ExposeConfiguration, please have a look. On Wed, Feb 18, 2009 at 10:12 AM, Karron Qiu wrote: > Sorry for my bad English, that confused you. > > I have two reasons here. > > 1. ExposeConfiguration method can't be called many times. It's an > delegate , not a list that contains

[fluent-nhib] Re: Bug with CustomType in a Component?

2009-02-17 Thread Brendan Erwin
Did some stepping and found this: PropertyMap.Write() public void Write(XmlElement classElement, IMappingVisitor visitor) { visitor.Conventions.AlterMap(this); XmlElement element = classElement.AddElement("property") .WithAtt("name", _propert

[fluent-nhib] Re: In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread Karron Qiu
Thank you very much. On Wed, Feb 18, 2009 at 6:26 AM, C+++ wrote: > In fact, it's a simple patch, the way to retrieve the current dialect should > be changed in the SessionSource ctor to the one used in the Initialize > method. > > Like this: > -_dialect = _sessionFactory.Dialect; >

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread Karron Qiu
Sorry for my bad English, that confused you. I have two reasons here. 1. ExposeConfiguration method can't be called many times. It's an delegate , not a list that contains delegates. If I call this method many times, only the last one will be executed. Because I have some plugins for nh initiali

[fluent-nhib] Bug with CustomType in a Component?

2009-02-17 Thread Brendan Erwin
I didn't see anything in the issue list about this so maybe I'm the first to notice: Given this mapping: WithTable("Insurance"); ... Component(x => x.InsuranceCardData, m => {

[fluent-nhib] Re: In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread Steven Lyons
Thanks for the quick fix, guys. Your help is much appreciated. On Feb 17, 5:59 pm, James Gregory wrote: > That looks a little bit involved for my liking... ;) > Applied, thanks! > > On Tue, Feb 17, 2009 at 10:26 PM, C+++ wrote: > > > In fact, it's a simple patch, the way to retrieve the curren

[fluent-nhib] Re: In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread James Gregory
That looks a little bit involved for my liking... ;) Applied, thanks! On Tue, Feb 17, 2009 at 10:26 PM, C+++ wrote: > In fact, it's a simple patch, the way to retrieve the current dialect > should be changed in the SessionSource ctor to the one used in the > Initialize method. > > Like this: > -

[fluent-nhib] Re: In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread James Gregory
Officially, we don't support 2.1 currently; we've got some other things in-house to sort out before we tackle that beast. Fluent NHibernate is targeted at 2.0.1GA. That being said, we'll accept patches to support 2.1 as long as: a) they're not nasty horrible hacks and b) they don't confuse users of

[fluent-nhib] Re: In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread Steven Lyons
Hi Paul, There are two different issues. The first was the 2.1 binaries being incorrect. Thanks for reverting that change. The second is that some SessionSource code from r301 depends on nh 2.0 and so won't compile with the proper 2.1 binaries. The problem appears to be that it is trying to set I

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread Paul Batum
Ribbit! Ribbit! On Wed, Feb 18, 2009 at 1:16 AM, James Gregory wrote: > Right, the constructor change is in. You can now do this: > var cfg = new Configuration(); > > Fluently.Configure(cfg) > .blah(); > > > On Tue, Feb 17, 2009 at 12:00 PM, James Gregory > wrote: > >> Calm it Kermit. I'm not

[fluent-nhib] Re: Obscure Mapping Error

2009-02-17 Thread Jimit
I've created a patch adding support for mapping entities in multiple assemblies. It basically follows the logic I suggested in the posts above. I've added a test verifying it works and as well as updated 3 tests that were failing as a result (I think) of a recent change in the mappings pushing col

[fluent-nhib] Re: Obscure Mapping Error

2009-02-17 Thread Jimit
The base classPersistenceModel already has a method AddEntityAssembly (Assembly assembly) seeming to suggest the semantics of working with multiple entity assemblies is already part of the API. I'd think it would simply be a matter of fitting the call into the fluent api for APMs, though there cou

[fluent-nhib] Re: Obscure Mapping Error

2009-02-17 Thread Jimit
Any word on support for mapping entities from multiple assemblies? I'd also appreciate feedback on the proposed solution above. On Feb 12, 11:40 pm, Jimit wrote: > Maybe we need a instance method on AutoPersistenceModel a la > IncludeEntitiesFromAssembly so we could say: > > var model = > AutoPe

[fluent-nhib] Re: Primary Key naming

2009-02-17 Thread James Gregory
After some thorough investigation, I'm fairly certain it's not possible to name PKs with NHibernate, so we're unable to support it either. I'm going to post a question on the main nhusers mailing list to see if anyone has any ideas, but I've trawled the schema and done some tests and I can't find a

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread James Gregory
Right, the constructor change is in. You can now do this: var cfg = new Configuration(); Fluently.Configure(cfg) .blah(); On Tue, Feb 17, 2009 at 12:00 PM, James Gregory wrote: > Calm it Kermit. I'm not against having a constructor overload, I'll do > that next time I'm in there. > > As for e

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread James Gregory
Calm it Kermit. I'm not against having a constructor overload, I'll do that next time I'm in there. As for exposing the property, I'd prefer not to because it's polluting the API, but I'm not that fussed. All I wanted to know was why he said he couldn't use the ExposeConfiguration; not didn't wan

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread Paul Batum
Just wanted to add that I recognise you can get a reference to it using Tuna's trick with the closure but I think its highly unintuitive. On Tue, Feb 17, 2009 at 9:34 PM, Paul Batum wrote: > James, is there a reason you don't want to expose the Configuration? What > if someone wants to do someth

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread Paul Batum
James, is there a reason you don't want to expose the Configuration? What if someone wants to do something with it after the session factory is built? It seems perfectly reasonable to me for the getter to be public. Also, I wanted to add an overload to Fluently.Configure that takes an existing Con

[fluent-nhib] Re: Named queries?

2009-02-17 Thread James Gregory
Nope, but you can mix fluent and hbm mappings, so that'd probably do the trick. See: Fluent Configuration On Mon, Feb 16, 2009 at 4:09 PM, jean.crot...@gmail.com < jean.crot...@gmail.com> wrote: > > Is there anyway to define named querie

[fluent-nhib] Re: Can I get the nh's Configuration instance from FluentConfiguration?

2009-02-17 Thread James Gregory
Why can't you use the ExposeConfiguration method? Some explanation would help. On Tue, Feb 17, 2009 at 7:33 AM, Karron Qiu wrote: > > Thank you. > > On Tue, Feb 17, 2009 at 3:28 PM, Tuna Toksoz wrote: > > Configuration cfg; > > var fconfig=Fluently.Configure().ExposeConf

[fluent-nhib] Re: Combine mapping file to use sql-insert element for stored procedures

2009-02-17 Thread James Gregory
I've never used stored procedures with NHibernate, so I can't comment how correct your mapping is; but to use hbm mappings with Fluent NHibernate you need to add them. Fluently.Configure() .Database(configurer) .Mappings(m => { m.FluentMappings.AddFromAssemblyOf(); m.HbmMappings.AddFr

[fluent-nhib] Re: In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread Paul Batum
Hi Karron, Looks like Andy accidentally checked in modifications to the nh21 files in this change. I've reversed the changes. Paul Batum On Tue, Feb 17, 2009 at 8:37 PM, Karron Qiu wrote: > > I copied my own nhibernate dlls to t

[fluent-nhib] Re: Primary Key naming

2009-02-17 Thread James Gregory
Yeah, no support for this yet. On Tue, Feb 17, 2009 at 9:43 AM, Paul Batum wrote: > Ahh, I don't think we have support in for this one yet. > > > On Tue, Feb 17, 2009 at 6:48 PM, Guido Ziliotti > wrote: > >> Not really, actually I am looking for >> Id(x=>x.Id).WithPrimaryKeyName("PK_CLASS"); >>

[fluent-nhib] Re: Primary Key naming

2009-02-17 Thread Paul Batum
Ahh, I don't think we have support in for this one yet. On Tue, Feb 17, 2009 at 6:48 PM, Guido Ziliotti wrote: > Not really, actually I am looking for > Id(x=>x.Id).WithPrimaryKeyName("PK_CLASS"); > > I admit I am not sure this can be done since basically I started from > scratch with FluentNhibe

[fluent-nhib] In the nhib2.1 folder, the version of NHibernate.dll is 2.0.1.4000?

2009-02-17 Thread Karron Qiu
I copied my own nhibernate dlls to this folder, but compile failed, because ISessionFactory doesn't have Dialect now in the nhibernate svn version, but the SessionSource.cs uses it. -- Regards, Karron --~--~-~--~~~---~--~~ You received this message because you

[fluent-nhib] On-to-many problem

2009-02-17 Thread BjartN
I have a Vessel object that has a one-to-many relationship with a VesselDetail object. When I add a VesselDetail object to the Vessel object and try to save the Vessel object, it seems NHibernate does not add the foreign key when inserting the VesselDetail object. Where am I going wrong here ? I

[fluent-nhib] Combine mapping file to use sql-insert element for stored procedures

2009-02-17 Thread Relleum
I have a User class that is persisted to a User table in the database. I would like to use a stored procedure for insertions, since there is some complex logic that happens in the database. Since the parameters required by the stored procedure are nowhere close to the properties of the User class