[fluent-nhib] Re: Mapping private properties

2009-01-11 Thread Brendan Erwin
Maybe you could call the method PrivateProperty and ProtectedProperty, just so it reads even clearer. On Jan 11, 2009, at 3:57 PM, James Gregory wrote: > Guys, > > We've been quite regularily receiving requests and/or complaints > about not being able to map private and protected properties.

[fluent-nhib] Identity conventions and GeneratedBy.Foreign

2009-01-11 Thread James Gregory
Guys, I've been attempting to add a convention for altering Ids, ends up it's a little tricker than expected. There's some generic hell going on, long and short of it is convention requires a non generic signature, other conventions use an interface, but the identity GeneratedBy property needs the

[fluent-nhib] Re: Mapping private properties

2009-01-11 Thread chris
+1 for the same reason Paul said that it doesn't require changes to class map. -Original Message- From: Paul Batum To: fluent-nhibernate@googlegroups.com Sent: Sun, 11 Jan 2009 6:33 pm Subject: [fluent-nhib] Re: Mapping private properties +1 I really like how it looks,

[fluent-nhib] Re: Mapping private properties

2009-01-11 Thread Paul Batum
+1 I really like how it looks, and I like how it means there are zero changes to class map this way. Paul Batum On Mon, Jan 12, 2009 at 8:14 AM, Tuna Toksöz wrote: > Great idea, looks good to me. > > > Tuna Toksöz > http://tunatoksoz.com > > Typos included to enhance the readers attention! > >

[fluent-nhib] Re: FW: Inheritance and References in automapper

2009-01-11 Thread Paul Batum
Hi Sebastien, Yes, you are getting normal NH behavior. The short of it is that the DB has not been touched (the Thumbnail property is lazy), so NH doesn't know what the specific type is. Once you call methods on the proxy, NH will do a db hit, discover the right type, and then you will get the app

[fluent-nhib] Re: Tools > NHib2.1 LinFu/Castle Proxy Generators

2009-01-11 Thread James Gregory
Sorry, I don't have a copy. Hopefully one of the other guys might. On Sun, Jan 11, 2009 at 9:58 PM, kev.m.mul...@googlemail.com < kev.m.mul...@googlemail.com> wrote: > > > Does anyone have a copy of the Linfu or Castle proxy generator DLL > that is compiled against the NHibernate2.1 DLLs in the t

[fluent-nhib] Re: Is it a bug about Many2One.TheColumnNameIs fuction or just a special design?

2009-01-11 Thread James Gregory
You need to specify both conventions because they're used for other things besides References, it just so happens this scenario uses both. It may not be optimal, but that's how it works currently. The same thing applies to the non convention approach. There are cases when people will want different

[fluent-nhib] Re: Debugging Xml Output by FNH

2009-01-11 Thread James Gregory
Ryan, as far as I can tell WriteMappingsTo does nothing to affect the ordering of the properties. What exactly are you seeing that differs? PersistenceModel.Configure uses the MappingVisitor which calls ApplyMappings on each mapping, which itself calls CreateMapping which uses writeTheParts and doe

[fluent-nhib] Tools > NHib2.1 LinFu/Castle Proxy Generators

2009-01-11 Thread kev.m.mul...@googlemail.com
Does anyone have a copy of the Linfu or Castle proxy generator DLL that is compiled against the NHibernate2.1 DLLs in the tools folder? I'm trying to get NHibernate 2.1, Linq2Nhibernate playing nicely together, but I am having a major headache when it comes to dependency versions. It seems that

[fluent-nhib] Re: Mapping private properties

2009-01-11 Thread Tuna Toksöz
Great idea, looks good to me. Tuna Toksöz http://tunatoksoz.com Typos included to enhance the readers attention! On Sun, Jan 11, 2009 at 10:57 PM, James Gregory wrote: > Guys, > We've been quite regularily receiving requests and/or complaints about not > being able to map private and protect

[fluent-nhib] FW: Inheritance and References in automapper

2009-01-11 Thread Sebastien Lambla
Hi guys, I'm stuck but I'm not sure if it's a an nhib problem, an automapper problem or a linq2nhib... I have the following (ids n stuff removed): class Image { FileSource Thumbnail; }abstract class FileSource { ... }class FileSystemSource { string Path; } I add a FileSystemSource to the Image

[fluent-nhib] Mapping private properties

2009-01-11 Thread James Gregory
Guys, We've been quite regularily receiving requests and/or complaints about not being able to map private and protected properties. I think we all know why this isn't possible, and I think we're mostly in agreement that allowing this is kinda against the purpose of Fluent NHibernate; however, peop

[fluent-nhib] Re: Repository

2009-01-11 Thread Stuart Campbell
Yeah I wasn't completely happy with the inheritance approach. Although I also didn't want to use service location to get hold of the session everywhere. But I suppose if I get the container to inject the ISession instead of ISessionSource then I can keep a reference to it in any Repository subclass

[fluent-nhib] Re: Repository

2009-01-11 Thread Jeremy D. Miller
The way we handle that was to make our Repository take in an ISession instead of the ISessionSource. Assuming that your IoC tool is set with the scoping correctly, we can simply consume the exact same ISession in another class that opens up special abilities. I vote down on opening up ISession

[fluent-nhib] Re: Repository

2009-01-11 Thread James Gregory
Not me. I think a lot of the Framework stuff is pretty unloved currently. As such, I have no real objection to that being made public in trunk, but isn't that breaking the abstraction? On Sun, Jan 11, 2009 at 7:53 PM, Stuart Campbell wrote: > Hi, > > I was wondering how many people are using > F

[fluent-nhib] Repository

2009-01-11 Thread Stuart Campbell
Hi, I was wondering how many people are using FluentNHibernate.Framework.Repository in anger and if so, how you are handling custom queries. The reason I ask is because I'm deriving from Repository but finding that sometimes I need to use the ISession and it isn't really exposed. My repositories

[fluent-nhib] Re: Map protected property

2009-01-11 Thread sirrocco
Ok, thanks for the links. On Jan 11, 1:32 pm, "James Gregory" wrote: > Basically, no there isn't a way to do that. Fluent NHibernate relies on > static reflection to do it's business, and that can only work with public > properties. > This was all discussed > here

[fluent-nhib] Re: Auto Mapping blog posts

2009-01-11 Thread Andrew Stewart
Cheers James This is something that I've been meaning to do for ages, also I never knew you could use TypeConventions that way so thanks for pointing it out. :o) Andy On Sun, Jan 11, 2009 at 4:24 PM, James Gregory wrote: > For anyone that doesn't subscribe to my blog, I've started writing a seri

[fluent-nhib] Auto Mapping blog posts

2009-01-11 Thread James Gregory
For anyone that doesn't subscribe to my blog, I've started writing a series on Fluent NHibernate, starting with the Auto Mapping stuff. So far I've written these posts: Auto Mapping Introduction Auto Mapping Conve

[fluent-nhib] Re: Map protected property

2009-01-11 Thread James Gregory
Basically, no there isn't a way to do that. Fluent NHibernate relies on static reflection to do it's business, and that can only work with public properties. This was all discussed here

[fluent-nhib] Map protected property

2009-01-11 Thread sirrocco
Here's what I'm trying to do : I have a Project entity that has many Tasks. A Task has a BelongsToProject property that I want to keep protected - and I want to do this so no one can go : project.Tasks [0].BelongsToProject , thus enforcing the Project aggregate root. Is there a way to do this ?