[fluent-nhib] version 1.1 generating different fk column names than 1.0

2010-06-01 Thread depaulo
Hi All I am wondering if something has changed in how fluent is now creating the fk column] names for one-many relationships. We have an existing project which we are just updating to use 1.1 (and therefore nhib 2.1.2 etc) and when i regen the database, some odd fk names are created. I have manage

[fluent-nhib] Re: Discriminator column for sub classes

2009-11-18 Thread depaulo
Hi James My maps look like public class EmailMap : MappingBase { public EmailMap() { Map(x => x.Title); Map(x => x.Body).Length(1); Map(x => x.ToAddress); Map(x => x.FromAddress); Map(x => x.CC); M

[fluent-nhib] Discriminator column for sub classes

2009-11-18 Thread depaulo
Hi All I have just upgraded from a rather old version of fluent nhibernate (rev. 447) to the latest one (along with 1.2.0.4 of nhib) and something has changed regarding what is stored in the discriminator column when you have a single table class hierarchy. It used to store the fully qualified typ

[fluent-nhib] Re: Schema Generation Created/Modified Dates

2009-05-18 Thread depaulo
You might be looking for nhibernate interceptors. If you do a bit of googling on auditing, nhibernate and interceptors you should get something. I think people tend to implement an interface on the domain objects which states that the object has a LastUpdateDate column, and then in the interceptor

[fluent-nhib] Re: One to Many mapping to an Enum

2009-04-28 Thread depaulo
enum. What you're looking for is an > element mapping for your collection. Something like this: > HasMany(m=>m.SupportedLanguages).AsSet().AsElement(columnNameHere); > > On Tue, Apr 28, 2009 at 12:08 PM, depaulo > wrote: > > > > > I have the follow

[fluent-nhib] One to Many mapping to an Enum

2009-04-28 Thread depaulo
I have the following: public class Survey { IList SupportedLanguages {get;set;} } public enum Language { English, French } and I am trying to map the Survey class with HasMany (m=>m.SupportedLanguages) I am getting the 'Reference to unmapped class Language' error which is understand

[fluent-nhib] Re: Unable to use an abstract class in my hierarchy (am using generated guids and version in entitybase)

2009-04-15 Thread depaulo
Fantastic! That worked great! Many thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this gr

[fluent-nhib] Unable to use an abstract class in my hierarchy (am using generated guids and version in entitybase)

2009-04-14 Thread depaulo
Hi When I try mapping the following model and inserting an OpenProject I get this error. If I make Project non-abstract it works. Anyone got any ideas? NHibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [FluentNHib.Cor

[fluent-nhib] Re: Probably really dumb question regarding one-to-many. Do you really need the back ref?

2009-04-05 Thread depaulo
. But great at the same time :) On Apr 5, 11:56 pm, depaulo wrote: > This is probably a daft question but I keep seeing contradictory info > on the internet and even in the nhib book. > If I have an Order with a IList OrderLines {get; set;} > property and have the following in my mappi

[fluent-nhib] Probably really dumb question regarding one-to-many. Do you really need the back ref?

2009-04-05 Thread depaulo
This is probably a daft question but I keep seeing contradictory info on the internet and even in the nhib book. If I have an Order with a IList OrderLines {get; set;} property and have the following in my mapping for Order: HasMany(x => x.OrderLines) .AsList()

[fluent-nhib] Re: Version and Discriminator not ordering correctly

2009-04-02 Thread depaulo
It works now. Thanks. On Apr 2, 2:22 pm, Hudson Akridge wrote: > This should have been resolved in revision 434. Please let me know if you > still experience the problem after doing an update to the current > revision :) > > On Thu, Apr 2, 2009 at 5:49 AM, depaulo wrote

[fluent-nhib] Version and Discriminator not ordering correctly

2009-04-02 Thread depaulo
http://code.google.com/p/fluent-nhibernate/issues/detail?id=95 The notes in the issue say that you couldnt replicate this. Just to let you know, I have posted in there the code to replicate it and have put a (rough) fix in too. If the fix (or a more thorough version) could be added to trunk that

[fluent-nhib] Re: PersistenceSpecification question

2009-04-02 Thread depaulo
Sorry to butt in but is it something to do with the .WithColumns("ProjectID"); in References(x => x.Project).Cascade.All().WithForeignKey ("ProjectID").WithColumns("ProjectID"); I have just found that if I have a ParentID property in my Child object and then use References(x => x.Parent, "Pare

[fluent-nhib] Why is Transaction required in the first project example required for Many to Many to work?

2009-03-31 Thread depaulo
I was wondering... I noticed that in the First Project example, if you remove the: using (var transaction = session.BeginTransaction()) then the StoreProduct table is not populated. Everything else is however populated ok. Does anyone have any idea why the transaction is required for this? --~-

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

2009-03-30 Thread depaulo
AAAGH! Sorry! I since read DG's reply properly (I was copying your code from the website tutorial which needs to be updated). Added the Cascade.All() and it now works. Oops. On Mar 30, 11:03 pm, depaulo wrote: > I am afraid I have the same problem and am using the latest code fr

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

2009-03-30 Thread depaulo
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 help appreciated! On Mar 25, 10:09 pm, James Gregory wrote: > Great, glad that fixed it. > And yes, that's