[fluent-nhib] Re: Can a Child have a list of Children items?

2009-03-15 Thread James Gregory
n't see it. > I'm not too sure how to debug this either. Should I try making a > RouteObjNH.hbm.xml file and doing it that way? Is there any other way > to get additional debug info? Or if there are any examples of 3 levels > like this. I would think that another level w

[fluent-nhib] Re: SchemaUpdate and Fluent NH

2009-03-15 Thread James Gregory
If that were your problem, you'd be getting errors from the database, not nothing. http://stackoverflow.com/questions/366176/how-to-update-database-table-schemas-with-nhibernate-schema-generation If that doesn't help, I'll need to see some code. On Sun, Mar 15, 2009 at 9:08 PM, Sushant wrote: >

[fluent-nhib] Re: SchemaUpdate and Fluent NH

2009-03-16 Thread James Gregory
It looks correct. On Mon, Mar 16, 2009 at 8:01 AM, Sushant wrote: > > > Is my CODE correct? and Should I use SQL Server CE instead.. will it > work there? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Flue

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-16 Thread James Gregory
There's a TableName property in IClassMap, so you could do: return string.IsNullOrEmpty(target.TableName) Similarly there's a GetColumnName() method on IIdentityPart. On Mon, Mar 16, 2009 at 3:07 PM, JohnRudolfLewis wrote: > > I have a domain entity class with a silly long name. My > IClassConven

[fluent-nhib] Re: AutoMap one-to-one

2009-03-16 Thread James Gregory
What exactly is your schema for this? On 3/16/09, Saintedlama wrote: > > I'm using auto mapping in my project and I'm trying to map a User to a > Profile. The domain model looks something like: > > public class User > { > public virtual int Id { get; set; } >

[fluent-nhib] Re: adapting Examples.FirstProject to use JetDriver for testing

2009-03-16 Thread James Gregory
I'm on my phone right now, so you'll have to excuse my berevity. You're missing a connection string of some form. From the Standard property you should be able to get at a ConnectionString method which should take a lambda method. On 3/16/09, David Woods wrote: > > I don't see any place that you

[fluent-nhib] Re: Auto Map Component Mapping with parent

2009-03-17 Thread James Gregory
It's possible, not sure of the exact method (I'm on my phone) but I think it's WithParentRef or something similar. On 3/17/09, Saintedlama wrote: > > It's possible in nhibernate to specify a parent in a component mapping > (see http://www.hibernate.org/hib_docs/nhibernate/html/components.html) >

[fluent-nhib] Re: One-To-Many with Composite Key

2009-03-17 Thread James Gregory
That looks like a bug. Have you updated recently? Because that looks like an outdated syntax. On 3/17/09, Bill wrote: > > Hi, > > I've seen some examples of a one-to-many relationship using a > composite key in Fluent. I was looking at the mapping xml file that > was generated and wondered if it

[fluent-nhib] Re: AutoMap one-to-one

2009-03-17 Thread James Gregory
st wondering how to tell > FNH to use a one-to-one mapping for the user<->profile relation and > I'm wondering why FNH does not recognize this relation as one-to-one > out of the box. > > On 16 Mrz., 19:35, James Gregory wrote: >> What exactly is your schema for this?

[fluent-nhib] Re: ForTypesThatDeriveFrom and private fields

2009-03-18 Thread James Gregory
, Nick Gieschen > wrote: > > > > "Use an autoproperty, not a field." > > > > My question then is why hasn't field access been implemented? Is there > > a theoretical reason for not implementing it or is it a bug or just > > something that hasn't been

[fluent-nhib] Re: LazyLoad false

2009-03-18 Thread James Gregory
What do you mean for a single session? As far as mappings are concerned, you either set it or you don't. On Wed, Mar 18, 2009 at 8:55 AM, Tom Warnat wrote: > Hi, > > > > is there a way to set for a single session LazyLoad = false? > > > > I tried to set it with SetAttribute(“lazy”, “false”) for

[fluent-nhib] Re: LazyLoad false

2009-03-18 Thread James Gregory
ut > it does not work. > > On 18 Mrz., 09:58, James Gregory wrote: > > What do you mean for a single session? As far as mappings are concerned, > you > > either set it or you don't. > > > > On Wed, Mar 18, 2009 at 8:55 AM, Tom Warnat wrote: > > > Hi, &

[fluent-nhib] Re: WithTable "optional=true"

2009-03-18 Thread James Gregory
I think that's the only way currently, yes. On Wed, Mar 18, 2009 at 9:24 PM, brendanjerwin wrote: > > Am I missing the fluent way to get optional=true on the join element? > > Is m.SetAttribute("optional","true") the best current way? > > > --~--~-~--~~~---~--~~ Y

[fluent-nhib] Re: Is there a way to tell AutoPersistence to not look at a property?

2009-03-18 Thread James Gregory
I'm not entirely sure what you're trying to do with that property, but automapping has a ForTypesThatDeriveFrom method that you can call IgnoreProperty inside, which is used to ignore specific properties. On Wed, Mar 18, 2009 at 8:09 PM, wgp...@gmail.com wrote: > > Thanks John. I've decided to

[fluent-nhib] Re: Mapping Generic Types

2009-03-18 Thread James Gregory
What doesn't work about mapping explicit implementations? On Thu, Mar 19, 2009 at 12:48 AM, Joshua wrote: > > I'm talking about mapping the concrete implementation of a generic > class: > > public class GenericClass > { > } > > public class ConcreteClass : GenericClass > { > } > > ConcreteClass

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-19 Thread James Gregory
Ok, there's obviously a flaw in the design here. I'll try to address this. On Thu, Mar 19, 2009 at 1:55 PM, angiel wrote: > > This is causing problems for me too. Since converting to the new > conventions, my IAutoMappingOverride classes no longer override the > convention column names. I trie

[fluent-nhib] Re: Applying new style conventions to PersistenceModel

2009-03-19 Thread James Gregory
The wiki is full of information on the new conventions: http://wiki.fluentnhibernate.org/show/Conventions Best approach is to not use the PersistenceModel directly like you are, use the Fluent Configuration. http://wiki.fluentnhibernate.org/show/FluentConfiguration On Thu, Mar 19, 2009 at 4:16 PM,

[fluent-nhib] Re: Applying new style conventions to PersistenceModel

2009-03-19 Thread James Gregory
nDiscovery property that's mentioned in the docs. model.ConventionFinder.Add(DefaultLazy.AlwaysFalse()); On Thu, Mar 19, 2009 at 4:23 PM, James Gregory wrote: > The wiki is full of information on the new conventions: > http://wiki.fluentnhibernate.org/show/Conventions > Best ap

[fluent-nhib] Re: using WithTable() with lambda

2009-03-19 Thread James Gregory
That's what the element is designed for, essentially one table that has had to be split in two for whatever reason. I encountered this in one system where there used to be a limitation to the number of columns you were allowed in a single table, so two tables made up an entity. What kind of relati

[fluent-nhib] Re: HasMany Component Mapping - WithParentReference missing?

2009-03-19 Thread James Gregory
Looks like an oversight, unfortunately! On Thu, Mar 19, 2009 at 4:52 PM, brown-cow wrote: > > I'm trying to do a mapping for a Set of Components on an entity. > Here's the mapping I have right now: > > ... > HasMany(x => x.Properties) >.AsSet() >.WithTableName("en

[fluent-nhib] Re: Mapping Generic Types

2009-03-19 Thread James Gregory
IdT,OwnerIdT,ObjectIdT] because > Type.ContainsGenericParameters is true. > > from code: > > public class ConcretePermissionMap : > FluentNHibernate.Mapping.ClassMap TestPermissionType, ConcretePermissionObject, int, int, int>> >{ >public ConcretePermissionM

[fluent-nhib] Re: HasMany Component Mapping - WithParentReference missing?

2009-03-19 Thread James Gregory
Well, I've 3 hours before I leave so you might see it before then. On Thu, Mar 19, 2009 at 5:07 PM, brown-cow wrote: > > Ok, good to know. Thanks for the quick reply. I'll hope to see it > the future maybe, huh? > > On Mar 19, 10:59 am, James Gregory wrote: &g

[fluent-nhib] Re: HasMany Component Mapping - WithParentReference missing?

2009-03-19 Thread James Gregory
I've committed this change. On Thu, Mar 19, 2009 at 5:11 PM, James Gregory wrote: > Well, I've 3 hours before I leave so you might see it before then. > > > On Thu, Mar 19, 2009 at 5:07 PM, brown-cow wrote: > >> >> Ok, good to know. Thanks for the qui

[fluent-nhib] Re: Problem with IIdConvention and AutoPersistanceModel.WithSetup

2009-03-19 Thread James Gregory
That looks correct to me. I guess the naming is not very revealing, but what they PrimaryKeyConvention actually does is sets the *column name* of the primary key, not what the property should be called. So you still need to use the FindIdentity method to tell the automapper what your identities are

[fluent-nhib] Re: One Mapping, Multiple Tables

2009-03-20 Thread James Gregory
I'm not sure there is a better way to handle this... but somebody on the nhusers mailing list might have a better idea, as it's a more general NHibernate question. If you do post over there and manage to get an answer, then we'll gladly help you convert it t

[fluent-nhib] Re: Foreign Keys

2009-03-20 Thread James Gregory
Ah, I shall have to update that. You're able to set multiple key columns, so the method has been changed to a collection. Try: part.KeyColumns.Add(part.ParentType.Name + "_FK"); On Fri, Mar 20, 2009 at 9:56 PM, Stuart wrote: > > Hi There, > > Just wondering what the new syntax is for this exampl

[fluent-nhib] Re: Sql2008 problem

2009-03-22 Thread James Gregory
What was it? On Sun, Mar 22, 2009 at 9:23 AM, Levin wrote: > > Well,I've found the issue... > Treat this post as nothing please:) > > On Mar 21, 2:51 pm, Levin wrote: > > Oh my~ > > [Note:I use nhibernate2.0.1 plus sql2008] > > > > I met sth odd,i tryed all kinds of recipes but no settle. > > >

[fluent-nhib] Re: PersistenceSpecification question

2009-03-22 Thread James Gregory
Hmm, try setting a Cascade on that relationship. On Sun, Mar 22, 2009 at 6:38 PM, Bill wrote: > > Hi, > > I'm new to FNH and NH and have made some progress with getting my > classes mapped using Fluent. Then I found the > PersistenceSpecification. My question is that when I am just checking > ag

[fluent-nhib] Re: PersistenceSpecification question

2009-03-23 Thread James Gregory
> .CheckProperty(x => x.ProjectID, "12345") > > .CheckProperty(x => x.RouteID, "R1") > > .CheckProperty(x => x.StartTime, dt) > > .CheckProperty(x =&

[fluent-nhib] Re: Overriding Components

2009-03-23 Thread James Gregory
Hey Martin, It's kind of alluded to at the start of this wiki page, but barely, components are relatively unsupported with automapping; you either automap them completely, or not at all. So stuff like ignoring is not supported. There's no

[fluent-nhib] Re: Overriding Components

2009-03-23 Thread James Gregory
> Martin > > > > *From:* fluent-nhibernate@googlegroups.com [mailto: > fluent-nhibern...@googlegroups.com] *On Behalf Of *James Gregory > *Sent:* 23 March 2009 13:01 > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: Overriding Components >

[fluent-nhib] Re: PersistenceSpecification question

2009-03-23 Thread James Gregory
ernate.Exceptions.GenericADOException: could not insert: > [vRA.Domain.RouteObjNH][SQL: INSERT INTO Route (MilesTraveled, > VehicleId, SlackTime, StartTime, Project_id, ProjectID, RouteID) > VALUES (?, ?, ?, ?, ?, ?, ?)] ---> > System.Data.SqlClient.SqlException: Invalid column name &#

[fluent-nhib] Re: As(Set/List/Bag) on ICollectionRelationship and an IToManyConvention

2009-03-23 Thread James Gregory
Hey Martin, The interfaces are lacking some of the methods simply because they weren't pulled up at time of creation, any that are missing most definitely should be introduced. As for conventions just for ToMany, that sounds like a good idea too. For the time being you could get away with using an

[fluent-nhib] Re: Automapping many to many with new conventions code

2009-03-23 Thread James Gregory
I was unaware that ever worked, but I've created an issueand will investigate. As for the site, it's up and has been all day. On Mon, Mar 23, 2009 at 7:52 PM, Hitt wrote: > > Before the conventions rewrite, the following two classe

[fluent-nhib] Re: Mapping composite user types with new conventions

2009-03-23 Thread James Gregory
Instead of IUserTypeConvention, try deriving from the base-class UserTypeConvention, see if that makes any difference. You should be able to do what you've written as: public class MoneyTypeConvention : UserTypeConvention {} On Mon, Mar 23, 2009 at 11:16 PM, James wrote: > > I'm having trou

[fluent-nhib] Re: Patch for Issues 96, 161, 162, 163 and 164

2009-03-24 Thread James Gregory
Hey Hudson, This is great, I really appreciate the work you've put into this. If you're willing, a patch with tests would be even better. It's not that I have any issue with the code you've written, but tests help us make sure we don't suffer any regressions in the future. Let me know if you have

[fluent-nhib] Re: .WithTable in IAutoMappingOverride doesn't override IClassConvention

2009-03-24 Thread James Gregory
Yep, something smelly is going on here. I'll investigate. On Tue, Mar 24, 2009 at 8:13 PM, Billy wrote: > > Looks like this is related to the issue described at > > http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/b866ce932b2a4f89 > > Incidentally, if I modify the class conv

[fluent-nhib] Re: Do not want to Virtualize my persistent classes

2009-03-24 Thread James Gregory
In your ClassMap, call LazyLoaded(). That should inform NHibernate that you don't want it to generate proxies for that particular entity. On Tue, Mar 24, 2009 at 8:38 PM, greg.co...@gmail.com wrote: > > I'm new to Fluent NHibernate for I appologive if this is a newbe > question with a simple answ

[fluent-nhib] Re: Patch for Issues 96, 161, 162, 163 and 164

2009-03-24 Thread James Gregory
ing else > sir. > > On Mar 24, 1:26 pm, Hudson Akridge wrote: > > I don't mind creating a couple tests. I'll see if I can't crank those > > out today for you guys. > > > > On Mar 24, 1:12 pm, James Gregory wrote: > > > > > > > >

[fluent-nhib] Re: PersistenceSpecification question

2009-03-24 Thread James Gregory
}; > > > > [TestMethod] > > public void VerifyRouteObjSaves() > > { > > DateTime dt = new DateTime(2009, 3, 20); > > > > ISessionBuilder sessionBuilder = new SessionBuilder(); > > ISession session = sessionB

[fluent-nhib] Re: Do not want to Virtualize my persistent classes

2009-03-24 Thread James Gregory
I do indeed, sorry about that. On 3/24/09, Paul Batum wrote: > James, do you mean Not.LazyLoaded() ? > > On Wed, Mar 25, 2009 at 8:24 AM, James Gregory > wrote: > >> In your ClassMap, call LazyLoaded(). That should inform NHibernate that >> you >> don'

[fluent-nhib] Re: Employees do not save in Examples.FirstProject

2009-03-25 Thread James Gregory
What database were you using? We've had this reported before but when I run it against SQLite everything saves. On Wed, Mar 25, 2009 at 3:57 AM, devSolo wrote: > > I've been playing around with Fluent NHibernate tonight and I'm liking > it very much. I just thought I'd let you guys know of a sm

[fluent-nhib] Re: Employees do not save in Examples.FirstProject

2009-03-25 Thread James Gregory
Actually, I stand corrected. There's obviously some kind of caching going on, because when I run it the Employees are retrieved by the Criteria query, but they're not actually in the table. Bizarre. On Wed, Mar 25, 2009 at 9:18 AM, James Gregory wrote: > What database were you usi

[fluent-nhib] Re: Employees do not save in Examples.FirstProject

2009-03-25 Thread James Gregory
erying. On Wed, Mar 25, 2009 at 9:24 AM, James Gregory wrote: > Actually, I stand corrected. There's obviously some kind of caching going > on, because when I run it the Employees are retrieved by the Criteria query, > but they're not actually in the table. Bizarre. > > On Wed

[fluent-nhib] Re: Fluently and PersistanceModel

2009-03-25 Thread James Gregory
You shouldn't need to create that PersistenceModel at all. Use the Mappings call . On Wed, Mar 25, 2009 at 12:08 AM, Dru Sellers wrote: > > how do I get the two of these to work together? is this it? > > Configuration nhcfg = Fluently.Co

[fluent-nhib] Re: .WithTable in IAutoMappingOverride doesn't override IClassConvention

2009-03-25 Thread James Gregory
overrides at all for this situation, as you're not actually doing anything with the automappings. You could just write another convention that's RegionTableNameConvention. Still, I'll fix this either way. On Tue, Mar 24, 2009 at 8:29 PM, James Gregory wrote: > Yep, something

[fluent-nhib] Re: .WithTable in IAutoMappingOverride doesn't override IClassConvention

2009-03-25 Thread James Gregory
his. On Wed, Mar 25, 2009 at 9:56 AM, James Gregory wrote: > Just looked into this, it seems overrides are being applied before > conventions. So the changes get overwritten by the conventions... The thread > you linked to is a bit of a bigger issue, but for this one I should just be > ab

[fluent-nhib] Re: When mapping a byte array, how do I specify the maximum size?

2009-03-25 Thread James Gregory
WithLengthOf is only usable with strings, not byte >> arrays. >> >> On Mar 11, 3:06 pm, James Gregory wrote: >> > Use the WithLengthOf method. >> > >> > On Wed, Mar 11, 2009 at 9:42 AM, pangyan >> wrote: >> > >> > > I've

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-25 Thread James Gregory
scade.SaveUpdate(); > > > > Or I might want to do ... > > if (!target.HasBeenSet(t => t.Cascade.None())) > >target.Cascade.SaveUpdate(); > > > > Just some thoughts. > > > > Jon > > > > On Thu, Mar 19, 2009 at 10:11 AM, James Gregory

[fluent-nhib] Re: IJoinedSubClassConvention never called

2009-03-25 Thread James Gregory
Hey Martin, Could you show me your convention code, and how you're adding them? I've just written a test that verifies that joined subclass conventions do get applied, so I think you've either got it setup wrong, or you've hit a bug I haven't been able to replicate. My test is this: [Test] publi

[fluent-nhib] Re: Mapping IDictionary (Key/Value)

2009-03-25 Thread James Gregory
You need to specify it as a map, with an index of whatever the string represents. HasMany(x => x.Properties) .AsMap(x => x.Name); Where Name is whatever the string key is. On Wed, Mar 25, 2009 at 11:31 AM, Peter wrote: > > I had read any discussion regarding dictionary mapping with Fluent > N

[fluent-nhib] Re: IJoinedSubClassConvention never called

2009-03-25 Thread James Gregory
rch 2009 11:58 > > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: IJoinedSubClassConvention never called > > > > James, > > > > Just tried adding the convention explicitly to rule out a discovery problem > and it still never gets called. > &

[fluent-nhib] Re: Mapping IDictionary (Key/Value)

2009-03-25 Thread James Gregory
So to clarify, your QuoteProperty class doesn't have a property that maps to the value of your key in the dictionary? On Wed, Mar 25, 2009 at 1:08 PM, Peter wrote: > > Thank you both very much for the fast answers, > > but I still do not get it, sorry. > > Should I map it like: > HasMany(x => x.

[fluent-nhib] Re: .WithTable in IAutoMappingOverride doesn't override IClassConvention

2009-03-25 Thread James Gregory
x27;s Northwind sample we should have: > > > > IdentityIdConvention > > > > AssignedStringIdConvention > > > > Rather than just PrimaryKeyConvention > > > > We should have Pluralized and Singular table name conventions. > > > > There

[fluent-nhib] Re: Using AutoPersistenceModel, how do I set a not null convention?

2009-03-25 Thread James Gregory
You want a property conventionto set everything to null, then you have a few options for how to handle the not null ones. something like: public class NullPropertyConvention : IPropertyConvention { public bool Accept(IProperty target) { re

[fluent-nhib] Re: Issues with a uni-directional collection mapping

2009-03-25 Thread James Gregory
This is by design in NHibernate. You either need to map the other side of the collection or allow your id to be nullable. I can't remember the exact reason this is, but it's something to do with not knowing the id to insert into that column at the time of save, so it as to do an update after it's c

[fluent-nhib] Re: Using AutoPersistenceModel, how do I set a not null convention?

2009-03-25 Thread James Gregory
map.Map(x => x.Title).Nullable(); > }) > > The Participant-table gets not null on all properties including > BarCode, Country and Title. > > This feels odd, or am I doing something strange? > > On Mar 25, 3:52 pm, James Gregory wrote: > > You want a property &

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-25 Thread James Gregory
ound that the override still isn't > overriding the table name convention, as described in the referenced > thread. > > Billy > > > On Mar 25, 6:55 am, Billy wrote: > > Thank you James! > > > > Billy > > > > On Mar 25, 5:12 am, James Gregory wrote

[fluent-nhib] Re: Mapping IDictionary (Key/Value)

2009-03-25 Thread James Gregory
Peter: I've just committed a change that should hopefully work for you. If you get the latest source, then try this: HasMany(x => x.Properties) .AsMap("Name") .KeyColumnNames.Add("PropertyId"); On Wed, Mar 25, 2009 at 3:09 PM, Peter wrote: > > I have tried the following after searching the s

[fluent-nhib] Re: Issues with a uni-directional collection mapping

2009-03-25 Thread James Gregory
Hmm, that's pretty odd. Try setting a Cascade.All on Subscription.SubscriptionDefinitions On Wed, Mar 25, 2009 at 4:48 PM, Greg Cook wrote: > Thanks for the quick reply... I've added the bi-directional relationship > between Subscription -0...*- SubscriptionDefinition and have a mapping test >

[fluent-nhib] Re: Mapping IDictionary (Key/Value)

2009-03-25 Thread James Gregory
That sounds right, I didn't make any changes to automapping. You could use the ForTypesThatDeriveFrom call, as that will have the changes in. // on your AutoPersistenceModel ForTypesThatDeriveFrom(m => m.HasMany(x => x.Properties) .AsMap("Name")); On Wed, Mar 25, 2009 at 5:26 PM, Peter w

[fluent-nhib] Re: Specifying database level "on delete" rule not possible?

2009-03-25 Thread James Gregory
That'd be correct, just pull that method that Paul added up into that interface. On Wed, Mar 25, 2009 at 6:32 PM, Miha Necak wrote: > > Sensational, thanks a milion, that solved a lot of problems. > > I do however have one more question - how difficult would it be to > make this available within

[fluent-nhib] Re: One to Many issues with the Example.FirstProject

2009-03-25 Thread James Gregory
I know you said you've got the latest code, but are you absolutely sure? I ask because I committed a fix to this a few hours ago. On Wed, Mar 25, 2009 at 8:10 PM, DG wrote: > > Looking for help in setting up the most basic one-to-many example. I > have used the Examples.FirstProject from the Fl

[fluent-nhib] Re: One to Many issues with the Example.FirstProject

2009-03-25 Thread James Gregory
o the StoreMap.cs. As the code currently is, is it > correct to say that a One-To-Many bidirectional relationship is > established between Store and Employee? > > On Mar 25, 4:18 pm, James Gregory wrote: > > I know you said you've got the latest code, but are you absolutely

[fluent-nhib] Re: Using AutoPersistenceModel, how do I set a not null convention?

2009-03-26 Thread James Gregory
antic model)? > > Paul Batum > > > On Thu, Mar 26, 2009 at 3:22 AM, Anders wrote: > >> >> target.HasAttribute("not-null") always returns false both in Accept >> and Apply, I created a ugly workaround by setting not-null explicitly. >> >> I'll try to create

[fluent-nhib] Re: IJoinedSubClassConvention never called

2009-03-27 Thread James Gregory
saeEntity > > Author should be a JoinedSubClass. > > The AutoMapper correctly maps Person as a class and Author as a > JoinedSubclass when I output the mappings. > > > > > *From:* fluent-nhibernate@googlegroups.com [mailto: > fluent-nhibern...@googlegroups.com] *On Behalf Of *

[fluent-nhib] Re: Mapping a one-to-many collection without index creates IDX column

2009-03-27 Thread James Gregory
A list is an indexed, ordered, collection of entities. A bag is an unindexed, in ordered collection. I'm guessing that because your entity doesn't have a primary key, there was no way for NHibernate to index or order it. On Fri, Mar 27, 2009 at 11:03 AM, Paul Batum wrote: > That would be a quest

[fluent-nhib] Re: Mapping a one-to-many collection without index creates IDX column

2009-03-27 Thread James Gregory
wrote: > Thanks guys for clarifying what's going on. I'm new to NH so I don't always > know what happens in which engine. Appreciate the response. > > - Jeremy > > > On Fri, Mar 27, 2009 at 4:22 AM, James Gregory wrote: > >> A list is an indexed, ordered, c

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-27 Thread James Gregory
100); } >} > >public class ClientMap : ClassMap >{ >public ClientMap() >{ >Id(x => x.Id, "ClientID").GeneratedBy.Native(); >BatchSize(666); > } >} > > > > On Mar 25, 12:12 pm, James Gregory

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-27 Thread James Gregory
ap interface. > > > > And from your post above I have make assumption that you have altered > > order to 1. conventions > 2. class maps (overrides 1) > 3. FNH > > defaults (overrides 1 and 2) - which I think is the way how it should > > work... > > >

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-27 Thread James Gregory
No problem, I think we're actually inconsistent in this regard. 2009/3/27 NiHique > > Ah, Attributes property - now I feel like idiot :) thanks :) > > On Mar 27, 10:41 pm, James Gregory wrote: > > The order is: > > > >1. Whatever is set in the class map

[fluent-nhib] Re: Making a reference to a class with a composite ID

2009-03-27 Thread James Gregory
Could you show an example of your schema? On Fri, Mar 27, 2009 at 6:34 PM, Matt wrote: > > So we are working on a Legacy Database that has some interesting table > setups. > > What we have is a class that contains a state and county. Which we > have mapped like so: > > UseCompositeID().WithKeyP

[fluent-nhib] Re: Making a reference to a class with a composite ID

2009-03-28 Thread James Gregory
nobodybutca: Have you overridden Equals in your entity? On Sat, Mar 28, 2009 at 11:29 AM, nobodybutca wrote: > > Mine is here: > > Error is : > NHibernate.MappingException: composite-id class must override Equals > (): Competency.Domain.AccessibleDocumentsDto > NHibernate.MappingException: Could

[fluent-nhib] Re: Making a reference to a class with a composite ID

2009-03-28 Thread James Gregory
Well your exception says: NHibernate.MappingException: composite-id class must override Equals (): Competency.Domain.AccessibleDocumentsDto On Sat, Mar 28, 2009 at 1:19 PM, nobodybutca wrote: > > James Gregory, > > Nope? that's all of my codes above. > > > On Mar

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-28 Thread James Gregory
Yep, that's how it used to be but there was no easy way to handle clearing and counting of columns for conventional support without adding all the methods directly to the property map itself. On Sat, Mar 28, 2009 at 11:00 PM, Paul Batum wrote: > Hi Lars, > > It looks like its been changed to sup

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-29 Thread James Gregory
); > > That way everyone could have their way. > > On Sat, Mar 28, 2009 at 8:59 PM, James Gregory > wrote: > >> Yep, that's how it used to be but there was no easy way to handle clearing >> and counting of columns for conventional support without adding all the >

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread James Gregory
Again, we had this previously and it suffers from the problem of not being able to interrogate or modify the collection at convention time. On Mon, Mar 30, 2009 at 4:06 PM, Paul Yoder wrote: > What about using a params string array in the method parameter to support > single and multiple column

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread James Gregory
Until we get to the point where we can clean it up, there are going to be some areas that are more complicated than may be necessary. You guys are just going to have to get along until that time. On Mon, Mar 30, 2009 at 4:26 PM, James Gregory wrote: > Again, we had this previously and it suffer

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread James Gregory
} > > > > return property; > > } > > } > > > > I’m not really sure why adding more than one column to the collections in a > method would affect the conventions though > > > > *From:* fluent-nhibernate@googlegroup

[fluent-nhib] Re: One to Many issues with the Example.FirstProject

2009-03-30 Thread James Gregory
s. Oops. > > On Mar 30, 11:03 pm, depaulo wrote: > > I am afraid I have the same problem and am using the latest code from > > the repository (revision 432). > > All the tables are saving apart from the Employee table (I am using > > SQL Server 2005) > > Any he

[fluent-nhib] Re: Fluent NHibernate Configuration for Session Context

2009-03-31 Thread James Gregory
If you're using Fluently.Configure there's also a Raw method, which'll allow you to set any property that isn't already exposed. On Tue, Mar 31, 2009 at 12:17 PM, Paul Batum wrote: > You set this on your NHibernate.Cfg.Configuration instance right? > > You should be able to use the ExposeConfigu

[fluent-nhib] Re: Has Index creation mapping been implemented yet?

2009-03-31 Thread James Gregory
It should still work. On Tue, Mar 31, 2009 at 4:14 PM, ComradeF wrote: > > I tried the first approach and I didn't see any new index the affected > table. Is it possible that this no longer works after the recent > conventions rewrite? > > In a way, I was sort of expecting/hoping to see somethin

[fluent-nhib] Re: AutoMap many-to-many table name

2009-04-02 Thread James Gregory
Not possible. If you were to create a HasManyToMany covention, how would it be applied to the HasManyToMany from your override if the conventions were run first? Overrides can alter the mapping, so conventions have to be applied last to accomodate for those potential changes. On 4/2/09, Karron Q

[fluent-nhib] Re: Multiple Inheritance strategies in the same hierarchy

2009-04-02 Thread James Gregory
Im not in a position to apply anything until Sunday, but if nobody else has done it by then I'll apply it. On 4/2/09, Martin Hornagold wrote: > > Previous patch was incomplete. > I have updated the issue and the patch: > http://code.google.com/p/fluent-nhibernate/issues/detail?id=179 > > > > >

[fluent-nhib] Re: Is there a way to specify "Loader" for the class?

2009-04-03 Thread James Gregory
Paul is correct, it's not supported right now. On Fri, Apr 3, 2009 at 2:11 PM, Paul Batum wrote: > Unless my knowledge is out of date, this isn't supported and you will have > to revert to using XML for classes that require this element. > > > On Thu, Apr 2, 2009 at 1:51 AM, epitka wrote: > >>

[fluent-nhib] Re: Adding FindAll() and Query() to IRepository?

2009-04-03 Thread James Gregory
Same here. On Fri, Apr 3, 2009 at 2:24 PM, Paul Batum wrote: > The remaining few elements of fluent nhibernate that are unrelated to > configuration and mapping don't really get a whole lot of love from any of > the regular commiters. It does not surprise me that you found the provided > IReposi

[fluent-nhib] Re: Can't get rid of Id column when using Automap!

2009-04-08 Thread James Gregory
You need to make sure you're instructing the automapper on how to find your identity property, as it defaults to expecting them to be called Id. In your case you need to modify the FindIdentity in the automapper setup. Something like: AutoPersistenceModel. /* your mapping */ .WithSetup(s =>

[fluent-nhib] Re: http://wiki.fluentnhibernate.org/ Access denied

2009-04-10 Thread James Gregory
Fine here, anyone else seeing this? On Fri, Apr 10, 2009 at 4:02 PM, Victor Kornov wrote: > > subj. Has been the case from yesterday. > > What's up? > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent N

[fluent-nhib] Re: FluentNHibernate.Framework missing from SVN?

2009-04-10 Thread James Gregory
Framework is long gone, that folder shouldn't even be in there. Most of the stuff in Framework wasn't in use, and the stuff that was has been merged into the main project. On Fri, Apr 10, 2009 at 12:57 AM, Glen wrote: > > I was trying to update my copy of FluentNHibernate.Framework, and it > app

[fluent-nhib] Re: http://wiki.fluentnhibernate.org/ Access denied

2009-04-10 Thread James Gregory
s fine for me > > Tuna Toksöz > Eternal sunshine of the open source mind. > > http://devlicio.us/blogs/tuna_toksoz > http://tunatoksoz.com > http://twitter.com/tehlike > > > > > > On Fri, Apr 10, 2009 at 8:47 PM, James Gregory wrote: > >> Fine here, anyo

[fluent-nhib] Re: SessionSource

2009-04-11 Thread James Gregory
No plans to remove it so far. On Sat, Apr 11, 2009 at 3:08 AM, Dru Sellers wrote: > Is that going to stay around?-d > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this

[fluent-nhib] Re: HasMany exception

2009-04-11 Thread James Gregory
Where have you said it's StaffID? HasMany(x => x.Staff) .Inverse() .Cascade.All() .KeyColumnNames.Add("StaffID"); Or look at overriding the conventions . On Sat, Apr 11, 2009 at 10:38 AM, MalcolmS wrote: > > > Hi, > > I have a one to man

[fluent-nhib] Re: HasMany exception

2009-04-11 Thread James Gregory
What examples are you following? If they're using those methods then they're using an old version of FNH. I don't know how you've got version 2.0.5 though, because we're only at 0.1 :) On Sat, Apr 11, 2009 at 12:15 PM, MalcolmS wrote: > > Ok thanks, that fixed it. > > One question though I have

[fluent-nhib] Re: PersistenceSpecification with no setters

2009-04-14 Thread James Gregory
ort properties without public > setters/getters: > http://www.mail-archive.com/fluent-nhibernate@googlegroups.com/msg01072.html > > There's another mail archive I can't seem to find on google where someone > (I'm thinking it was also James Gregory) brings up the point of not

[fluent-nhib] Re: Fluent NH and linq

2009-04-14 Thread James Gregory
We use Linq to NH for a few things, but it's not a part of our project. You need to be looking at NHContrib. On Tue, Apr 14, 2009 at 10:49 PM, Fregas wrote: > > Is linq-to-nhibernte part of this proejct? > > > --~--~-~--~~~---~--~~ You received this message becau

[fluent-nhib] Re: Create tables

2009-04-14 Thread James Gregory
Just use the regular NH way, I don't see how you can get much simpler than it already is. On Tue, Apr 14, 2009 at 11:01 PM, Fregas wrote: > > Is there some better/more magical way that FNH creates your schema for > you or do we just use the built in capability in NH. > > Thanks, > Craig > > > -

[fluent-nhib] Re: S#harp Architecture on VAN

2009-04-20 Thread James Gregory
Was this meant to be sent to the FNH list? On Mon, Apr 20, 2009 at 1:47 PM, Jon Kruger wrote: > Are these still being recorded? That time doesn't work for me and I hate > missing all of this good content! > > > On Sun, Apr 19, 2009 at 11:28 PM, zachariahyoung wrote: > >> >> >> Speaker Bio for t

[fluent-nhib] Re: Help with Subclassing

2009-04-20 Thread James Gregory
Are you using Auto Mapping or regular fluent mappings? On Mon, Apr 20, 2009 at 4:57 PM, Andyk wrote: > > Hi, > can anyone point in the right direction for examples on doing > subclassing? Im struggling to find anything. > At least I think I need subclassing, I have the following three > classes:

[fluent-nhib] Re: Conventions

2009-04-21 Thread James Gregory
Was the content on the wiki about conventions not of use? On Tue, Apr 21, 2009 at 1:15 PM, sirrocco wrote: > > I think I found the answere :), with the help of : > > http://marekblotny.blogspot.com/2009/04/conventions-after-rewrite.html > > > On Apr 21, 10:29 am, sirrocco wrote: > > Hi, I had 3

[fluent-nhib] Re: 'AddAlteration' for ClassMap

2009-04-21 Thread James Gregory
There's no way to inject raw XML. You'll need to fall back on traditional hbm mappings for things we don't support. As for AddPart being protected internal, if you've got a NaturalIdPart how about a patch? On Tue, Apr 21, 2009 at 8:57 PM, vaybabo wrote: > > Maybe I missed something, but I did no

<    1   2   3   4   5   6   7   8   9   10   >