[fluent-nhib] Re: How is this possible?

2009-01-16 Thread Brendan Erwin
It looks like that is the default behavior. See the XML: > > > But I'll give that a go anyway Nope, didn't make a difference. On Jan 16, 2009, at 4:02 PM, Chris Marisic wrote: > > > I think what you're missing is > > Id(x => x.Abbreviation, "StateAbbrev").GeneratedBy.A

[fluent-nhib] Re: How is this possible?

2009-01-16 Thread Chris Marisic
I think what you're missing is Id(x => x.Abbreviation, "StateAbbrev").GeneratedBy.Assigned()) On Jan 16, 3:26 pm, Brendan Erwin wrote: > I have a working map for State (PersistenceSpecification works): > > namespace Clearwave.Integration.Models.Data.Payers > { >      public class StateMap : Fl

[fluent-nhib] How is this possible?

2009-01-16 Thread Brendan Erwin
I have a working map for State (PersistenceSpecification works): namespace Clearwave.Integration.Models.Data.Payers { public class StateMap : FluentNHibernate.Mapping.ClassMap { public StateMap() { WithTable("USStates"); Id(x => x.Abbreviation,

[fluent-nhib] Custom collections

2009-01-16 Thread epitka
Does fluent support mapping custom collections. In NH it looks like this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent

[fluent-nhib] pacht uploaded (not a defect) to support Class.DynamicUpdate / Class.DynamicInsert / Class.OptmisiticLock

2009-01-16 Thread Marco
I've uploaded a patch, but it's marked as a defect. Can you change the type? See http://code.google.com/p/fluent-nhibernate/issues/detail?id=98 Thanks Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent NH

[fluent-nhib] Re: HasOne with a unique key

2009-01-16 Thread James Gregory
No problem, people often misinterpret many-to-one's as one-to-ones, so you're not alone :) On Fri, Jan 16, 2009 at 5:59 PM, John Teague wrote: > Thanks James, changing to References with a join fetch type did the trick. > I can stop banging my head against the wall now :) > > > On Fri, Jan 16, 2

[fluent-nhib] Re: HasOne with a unique key

2009-01-16 Thread John Teague
Thanks James, changing to References with a join fetch type did the trick. I can stop banging my head against the wall now :) On Fri, Jan 16, 2009 at 11:45 AM, James Gregory wrote: > That's not a one to one. A one to one is a relationship between two tables > that have identical primary key value

[fluent-nhib] Re: HasOne with a unique key

2009-01-16 Thread James Gregory
That's not a one to one. A one to one is a relationship between two tables that have identical primary key values, if it aint the primary key, it aint a one-to-one. What you're after is a one-to-many, or many-to-one depending on which way the relationship goes. HasMany or References. On Fri, Jan 1

[fluent-nhib] HasOne with a unique key

2009-01-16 Thread John Teague
Can anyone tell me how (fluent-nh or otherwise) to map a one-to-one relationship that is not based off of the primary key of the table. I have the following schema: Item id_col //primary key plinid // this is the unique fk column ProductLineItem plinid // primary key No matter what I do,

[fluent-nhib] Re: Self-Referential Mapping to Implement Hierarchical Tree Structure

2009-01-16 Thread Craig
Thanks Gabriel, the example you have uses two tables, not one (allowing a fancier tree than I need), but it convinced me that I was going in the right direction with my previous attempts. First I got this hbm working, easily enough: true

[fluent-nhib] External joined-subclass mappings

2009-01-16 Thread Marc Climent
Hi! I'm trying to move to Fluent NHibernate the mappings of the project I'm working on and I've encountered some difficulties. We have used and abused of the possibility to define external mappings like this one: ... That works quite well, and the BaseContent is mapped like th

[fluent-nhib] Re: PersistenceSpecification vs. Lazy Loading

2009-01-16 Thread brendanjerwin
At first I was determined to exclude ANY changes to my domain for the sake of the ORM, so that was the reason for wanting the change to be localized in the test framework. Of course, after your answer I realized that 1) I've already made changes for the ORM (virtual), and 2) Equals will behave wei

[fluent-nhib] Re: No definition of foreign key name possible on HasManyToMany part

2009-01-16 Thread Chris Missal
I came across this too Gabriel and forgot to ask about it. I meant to do some more digging, but if you're not finding the support either, then that makes two of us. :) On Fri, Jan 16, 2009 at 2:18 AM, Gabriel Schenker wrote: > > I just realized that it is not possible to define the name of the >

[fluent-nhib] Join support on SubClass

2009-01-16 Thread Beppler
Hi, I posted an small patch on issues that allos the specification of join inside subclass. That allows the use of "8.1.3. Table per subclass, using a discriminator" of NHibernate 2.0. PS: I mae an mistake when posted the patch and it is listed as an defect, but it is really an enhancement. --~--

[fluent-nhib] Re: PersistenceSpecification vs. Lazy Loading

2009-01-16 Thread James Gregory
You shouldn't need to do a custom Equals method, you should just be able to override standard Equals. The proxy would be a subclass of your entity class, so you shouldn't have any trouble with that; overriding Equals and GetHashCode is generally the solution for this kind of issue. On Thu, Jan 15,

[fluent-nhib] No definition of foreign key name possible on HasManyToMany part

2009-01-16 Thread Gabriel Schenker
I just realized that it is not possible to define the name of the foreign key constraint on the ManyToManyPart. Thus it is not possible to completely port e.g. the following xml-mapping to FNH

[fluent-nhib] Re: Self-Referential Mapping to Implement Hierarchical Tree Structure

2009-01-16 Thread Gabriel Schenker
please have a look at the following post (the Node hierarchy) http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/05/14/how-to-map-a-tree-in-nhibernate.aspx the corresponding mapping in FNH would be public class NodeMap : ClassMap { public NodeMap() { Id