[fluent-nhib] Discriminator column cannot be NULL exception

2010-01-18 Thread Berryl Hesh
Hello I am trying to map a hierarchy as table per class, and I'm getting the following exception: NHibernate: INSERT INTO ResourceBases DEFAULT VALUES; select last_insert_rowid() TestCase 'Smack.ConstructionAdmin.Tests.Data.MappingTests.ResourceMappingTests.CanSaveAndLoad_StaffMemberResource' fai

Re: [fluent-nhib] Multiple Databases

2010-01-18 Thread Hudson Akridge
More of a NH question than FNH, although Karl Seguin has already written up a pretty good article covering it: http://codebetter.com/blogs/karlseguin/archive/2009/03/30/using-nhibernate-with-multiple-databases.aspx

[fluent-nhib] Multiple Databases

2010-01-18 Thread RichL
I am currently building a new entity framework for a client but am currently stuck with the legacy databases (which are two separate SQL 2000 databases). What would be the best recommendation for using two separate databases in a single entity assembly? -- You received this message because you ar

Re: [fluent-nhib] Re: Link Table of Same Type

2010-01-18 Thread Robert Eberhart
I believe that our posts may have crossedI see that you posted after my last one. :-) I did get that problem solved. The details are included in my post before your last one, although please note that I caught the error wherein I put the .Cache directive after .Database instead of inside it.

Re: [fluent-nhib] Re: Link Table of Same Type

2010-01-18 Thread Paul Batum
Git does take a while to get used to, but is amazingly powerful once you do. I look forward to hearing whether my sample helped you at all. Paul 2010/1/17 Robert Eberhart > Thanks. I'm going to take a look at it...Downloaded GitExtensions, > which I have been meaning to do anyway. I use SubV

Re: [fluent-nhib] Base class mapping issue

2010-01-18 Thread Paul Batum
You don't need to. When working with fluent mappings as opposed to automappings, only the classes that you specifically write class maps for are mapped. The include/ignore methods are there to give the automapper guidance and simply have no meaning when working with fluently mapped classes. 2010/1

[fluent-nhib] Re: Link Table of Same Type

2010-01-18 Thread TheNephalim
You were absolutely correct, and I believe that I have the problem fixed. The problem was actually in the setup of my SessionFactory. This is correct and actually works: Fluently.Configure() .Database(MsSqlConfiguration.MsSql2000

Re: [fluent-nhib] Re: AutoMapping with Composite ID's

2010-01-18 Thread Hudson Akridge
I'm not an automapping guru sadly :( So again, there might be some workarounds that I'm unaware of (very possible). Hoping for Paul or James to chime in. They know much more about automapping than me. On Mon, Jan 18, 2010 at 2:29 PM, Corey Coogan wrote: > Thanks Hudson, > I saw this thread w

[fluent-nhib] Re: AutoMapping with Composite ID's

2010-01-18 Thread Corey Coogan
Thanks Hudson, I saw this thread where Chris C. wrote an implementation in November 09, but I don't see it in the trunk. http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/8c2a254c6b7bd932?fwc=1 I don't know where this ever ended up. Is there any other work around for thi

Re: [fluent-nhib] AutoMapping with Composite ID's

2010-01-18 Thread Hudson Akridge
I could be wrong, but I don't believe automapping supports composite Id's. At least I've never seen an example with that working. Id is the default choice when automapper fires, which is probably why there's not an automapping convention for compositeId. Someone else might come along and correct m

[fluent-nhib] AutoMapping with Composite ID's

2010-01-18 Thread Corey Coogan
I am trying to figure out a solution to using a convention for defining my composite key with AutoMapping. I've read some stuff but haven't found anything concrete. Almost all of my entities have a composite key that consists of a string and a date. We have a code generator that is converting ou

Re: [fluent-nhib] Re: Version in base class not being mapped

2010-01-18 Thread Hudson Akridge
Welcome :) When in doubt, throw implementation stuff (like Id and Version) on the base class for everything and forget about it :) On Mon, Jan 18, 2010 at 11:42 AM, Jeff Doolittle wrote: > Thanks Hudson, that makes total sense. I'm pretty satisfied already > since the latest build fixes the bas

Re: [fluent-nhib] Subclass Mapping Discriminator Value

2010-01-18 Thread James Gregory
There's a DiscriminatorValue method in SubclassMap which can be used to specify the value for that one entity, the equivalent of the first parameter in your SubClass calls. On Mon, Jan 18, 2010 at 5:49 PM, JB wrote: > I noticed that the DiscriminateSubClassOnColumn inline definitions are > depri

[fluent-nhib] Subclass Mapping Discriminator Value

2010-01-18 Thread JB
I noticed that the DiscriminateSubClassOnColumn inline definitions are depricated. How do I control the value of the discriminator using the new methodology. Or more specifically how should I replace this code: public class BaseClassMap : ClassMap { public BaseClassMap() {

[fluent-nhib] Re: Version in base class not being mapped

2010-01-18 Thread Jeff Doolittle
Thanks Hudson, that makes total sense. I'm pretty satisfied already since the latest build fixes the base-entity version problem. I can probably live with one extra property on my entities since I've been able to move most of the auditing properties to my component class. --Jeff On Jan 18, 9:3

Re: [fluent-nhib] Re: Version in base class not being mapped

2010-01-18 Thread Hudson Akridge
> > What I'd really like to do is put my version property on a component > class. That's an NH thing, not specifically a FNH thing. Head over to nhusers and they might be able to help you out a bit more. But this sort of thing I'm almost positive isn't possible. Your audit columns are business en

[fluent-nhib] Re: Version in base class not being mapped

2010-01-18 Thread Jeff Doolittle
I downloaded the latest build (614) and I was able to add a Version property to a base class, as described by Paul Batum. I'd like to add another wrinkle to the mix. What I'd really like to do is put my version property on a component class. I already have a component class for audit columns lik

Re: [fluent-nhib] column length is not being mapped

2010-01-18 Thread Hudson Akridge
Build 0? http://fluentnhibernate.org/downloads/fluentnhibernate-binary-1.0.0.614.zip Try that, it's 614. Can you also post your FNH mapping code that you're using for column length? We should have plenty of tests checking for that. On Mon, Jan 18, 2010 at 8:47 AM, Mikael Henriksson wrote: > buil

[fluent-nhib] Getting Data from all tables instead of one with HQL Query when I shouldn't

2010-01-18 Thread Ben
I have created 3 tables in my database and put data into them. The 3 tables all have foreign keys joining them together. Below are the table classes and there mappings. When I run the query listed at the end I get IList<> of the objects and they have the data from all 3 tables. However, my HQL quer

Re: [fluent-nhib] column length is not being mapped

2010-01-18 Thread Mikael Henriksson
build 0 because not even albacore runs on my system I am using the latest from your trunk. On Mon, Jan 18, 2010 at 3:39 PM, James Gregory wrote: > What build you on? > > On Mon, Jan 18, 2010 at 2:34 PM, Mikael Henriksson > wrote: > >> Hi, >> >> My column lengths are not being mapped which is cau

Re: [fluent-nhib] column length is not being mapped

2010-01-18 Thread James Gregory
What build you on? On Mon, Jan 18, 2010 at 2:34 PM, Mikael Henriksson wrote: > Hi, > > My column lengths are not being mapped which is causing problems for me. > Did I get a bad build or something? > > -- > You received this message because you are subscribed to the Google Groups > "Fluent NHiber

[fluent-nhib] column length is not being mapped

2010-01-18 Thread Mikael Henriksson
Hi, My column lengths are not being mapped which is causing problems for me. Did I get a bad build or something? -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To u

[fluent-nhib] Re: Version in base class not being mapped

2010-01-18 Thread Jon
Is anyone else still having this issue, or is it just me? It's exactly as Neal describes - when I have the Version property in the base class it doesn't work, and when it's in the subclass it works fine. As Deesky says, having to create an override for every entity class seems to defeat the point o

Re: [fluent-nhib] Fluent nhibernate automapping - how to order columns

2010-01-18 Thread James Gregory
Can't be done. Properties are mapped in the order they're given by .Net through the System.Type.GetProperties() method afaik, we do no ordering. On Sun, Jan 17, 2010 at 7:38 PM, Sean Feldman wrote: > When mapping a simple entity, I would like to set the order of columns > in generated schema. Wit

Re: [fluent-nhib] Base class mapping issue

2010-01-18 Thread James Gregory
For non-automapped classes you'd need to map it with a ClassMap. On Sat, Jan 16, 2010 at 9:47 PM, clayton collie wrote: > Paul, > can we do this for non-Automapped classes ? > > > On Sat, Jan 16, 2010 at 2:14 PM, Mark Nijhof wrote: > >> Cool Paul, >> >> That was it, At least FNH is able to map