[fluent-nhib] Re: What is the new override syntax for default-lazy=false?

2009-09-03 Thread Paul Batum
Hi Richard, I've been able to replicate your problem. Unfortunately it looks like any changes made to the HibernateMapping through automapping overrides are ignored. Until this issue is fixed, I suggest you create a convention like so: public class DefaultLazyOverride : IHibernateMappingConve

[fluent-nhib] Re: Many to many mapping using IdBag

2009-09-03 Thread Paul Batum
IdBags aren't supported yet, probably simply due to their infrequent use. I imagine the implementation would be straightforward. On Wed, Sep 2, 2009 at 10:46 AM, kasvis...@gmail.com wrote: > > I want to implement a many-to-many association as an IdBag. I dont see > that as an option. Has that no

[fluent-nhib] Re: Automap C# enums

2009-09-03 Thread David R. Longnecker
Conventions applied to your Configuration http://wiki.fluentnhibernate.org/Conventions For example, here's one I have in an app I'm working on at the moment that converts a standard enum (with integer values) to the enum type. public class StandardEnumConvention : IPropertyConvention, I

[fluent-nhib] Re: Entity-name attribute

2009-09-03 Thread Kevin Dente
Ah, well if SetAttribute doesn't fit with the current architecture, don't bother with it. That just wasn't the impression I had from the release note verbiage. On Sep 3, 9:34 am, Hudson Akridge wrote: > It's just a label :) Lets us know if it's a feature specific to FNH, or if > it's to put FNH

[fluent-nhib] Re: No Cascade Delete-Orphan option?

2009-09-03 Thread Mikael Henriksson
.I believe what you are looking for is Cascade.AllDeleteOrphan() On Thu, Sep 3, 2009 at 11:10 PM, James Crowley wrote: > > I'm probably missing something blindingly obvious here, but is there > any reason why there is no delete-orphan option when setting the > cascade types? > > Thanks > > James

[fluent-nhib] No Cascade Delete-Orphan option?

2009-09-03 Thread James Crowley
I'm probably missing something blindingly obvious here, but is there any reason why there is no delete-orphan option when setting the cascade types? Thanks James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Flu

[fluent-nhib] Automap Component with Component

2009-09-03 Thread Mike Chaliy
Is there any way to auto-map component with another component? class Entity{ Component1 Comp } class Component1{ Component2 Comp } class Component2{ } Right now I get: "NHibernate.MappingException: Could not determine type for: Component2" --~--~-~--~~~---~--~

[fluent-nhib] Automap C# enums

2009-09-03 Thread Mike Chaliy
Hi everyone, Every time I am adding property with enum type, I have to create override and add this property to mappings. How to do this globally? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" g

[fluent-nhib] Re: Entity-name attribute

2009-09-03 Thread Hudson Akridge
It's just a label :) Lets us know if it's a feature specific to FNH, or if it's to put FNH on equal footing with NH (which gets a higher priority). SetAttribute isn't possible anymore, at least, not without a significant amount of work from what I'm aware of. I'll talk to James about it when he ret

[fluent-nhib] Re: Entity-name attribute

2009-09-03 Thread Stuart Childs
Feel free to request it, but don't expect much. ;) I doubt we'll move back to that. For what it's worth, we actually do have a list of all the elements and attributes supported by NHibernate and their level of support in FNH. Part of the problem is that we simply don't know what some of them are f

[fluent-nhib] Re: Reveal of fields not supported

2009-09-03 Thread Stuart Childs
As you mentioned, the entire architecture of FNH is based primarily around properties. There is no support for fields at the moment, but you are not the first to request such a thing. As I recall, there was some discussion and it was decided that we'd wait until after the 1.0 release to consider f

[fluent-nhib] Re: Entity-name attribute

2009-09-03 Thread Kevin Dente
OK, added as issue 313. Not sure what you mean by "file it under NH Feature Parity" though - I don't see a way of doing that in GC. I'm regretting the removal of SetAttribute now - I think I'll request that it be added back in, as I'm sure this kind of scenario will happen again. On Sep 3, 6:29 

[fluent-nhib] Reveal of fields not supported

2009-09-03 Thread Morten Maxild
Hi, The wiki page has an example of revealing a private auto-property. Only Reveal.Property is found in FNH, and there is no Reveal.Field. Also the various ctors for ‘mapping-parts’ only deals with PropertyInfo/MethodI

[fluent-nhib] Re: Disabling lazy load

2009-09-03 Thread Stuart Childs
I think your problem is you've made the classic mistake of confusing session.Get and session.Load. session.Load will always return a proxy object. I can't remember if it will initialize it from the session cache, but if it's not in the cache it will be an empty object (except for the ID). If you

[fluent-nhib] Re: Access to SessionFactory

2009-09-03 Thread Stuart Childs
Being that we're all developers, maybe some source code would be more clear. :) Here's an example ripped straight from one of my libraries: var lconfig = ServiceLocator.Current.GetInstance("Default"); var config = Fluently.Configure() .Database(lconfig.PersistenceFor().Internal)

[fluent-nhib] Re: Entity-name attribute

2009-09-03 Thread Hudson Akridge
I don't believe it does (Don't have the source open in front of me at the moment, but I don't remember running across it). If you want to add that issue to FNH's issue tracker, and file it under NH Feature Parity, would be much appreciated. :) On Wed, Sep 2, 2009 at 7:31 PM, Kevin Dente wrote: >

[fluent-nhib] Re: Disabling lazy load

2009-09-03 Thread Mikael Henriksson
Hi, I am not 100% sure about how to achieve this in NHibernate since I am just a beginner at all this but I believe what you are after is something like EntityMode.Poco. The proxies are not used only for lazy loading they are used for *virtually* everything. I think you need to redesign some things

[fluent-nhib] Re: Automapping bi-directional one-to-many

2009-09-03 Thread Peter Hageus
Thank you for your time. I suspected it was something along those line. The only workaround I've been able to figure out is reflecting on the childtype in a convention, finding the reference to the parent and using that propertyname as key. But ChildType seems to be null in Apply so I haven't got i

[fluent-nhib] Re: Disabling lazy load

2009-09-03 Thread Vicente
Hello, thanks for your answer, but I don't really understand the relation between my problem and the post you gave me. First, this is a WPF application and I create the SessionFactory when the app is initialized, which is later saved in the DAOFactory and from there is injected in the different D

[fluent-nhib] Re: Automapping bi-directional one-to-many

2009-09-03 Thread Paul Batum
Hi Peter, Thanks for your patience. I've established that the problem you are running into is due to the fact that the automapper expects your parent property to look like this: public TestEntityA TestEntityA { get; set; } i.e. to use the same name as the type. If you don't follow this assumptio

[fluent-nhib] Re: Access to SessionFactory

2009-09-03 Thread Mikael Henriksson
I fail to see the problem really. FluentlyConfigure returns a fluent configuration if you call BuildConfiguration(); that returns an Nhibernate Configuration. Why can't you work with that before BuildSessionFactory? At this point Fluently does not do anything it just passes on the Configuration and

[fluent-nhib] Re: Disabling lazy load

2009-09-03 Thread Mikael Henriksson
The problem is not lazy loading the problem is the proxy. You need to instantiate nhibernate and build the sessionfactory at the root level of the application. The session should be per user basically (in a web application save it in HttpContext.Current) that way the user get the same session every

[fluent-nhib] Re: Automapping, protected, and problems with design

2009-09-03 Thread queen3
I by the way, as far as I understand, if I do mapping.Map(x => Reveal.Property("quantity")); I also have to do mapping.IgnoreProperty(x => x.Quantity); so it's TWICE a work if I want a good design. Or, back to mapping inside entities... Or, avoid AutoMapping at all. So, to summa

[fluent-nhib] Automapping, protected, and problems with design

2009-09-03 Thread Sergey Prokhorenko
I have conflicts between easiness of mapping and good entities design. Let me explain. Suppose I have class OrderItem, which obviously have Products property. Now, I want it to be read-only, because I want users to call AddProduct() which checks if this product is allowed for this item. I saw it

[fluent-nhib] Re: Access to SessionFactory

2009-09-03 Thread Joseph LeBlanc
Upon further inspection simply exposing access to the SessionFactory alone isn't enough because once the factory has been created it's too late to set the interceptor on the fluent config object (using the ExposeConfiguration method). Unfortunately the configuration property SessionSource accesse