[fluent-nhib] Re: Spatial And Fluent

2009-06-19 Thread Heinrich Breedt
Hi, I have actually ended up just using ado.net for that. I needed to use the geography datatype and only the geometry datatype was accommodated. I started on that, but time pressures stopped me. When I have some time, i will try and look into it again On Sat, Jun 20, 2009 at 2:07 AM, Can Özmen w

[fluent-nhib] Re: Caching

2009-06-19 Thread Andrew Stewart
Hi Jose This is probably really late to reply, but looks like it's been implemented on the individual Classes. Here's an example below: var autoMapper = AutoPersistenceModel .MapEntitiesFromAssemblyOf() .ForTypesThatDeriveFrom(q => q.Cache.AsReadOnly())

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Hudson Akridge
I would then recommend mapping the ACCOUNT_ID as your Id(), especially if that's what's used as a reference for other child tables. It won't affect your database structure, it's just a way to tell NHibernate what to use for a primary key during association fetching. If you use both GUID_ACCOUNT_ID

[fluent-nhib] Re: Spatial And Fluent

2009-06-19 Thread Can Özmen
Hi Heinrich, Any news on your FNH-Spatial integration? Regards, Can Özmen. On Tue, Apr 21, 2009 at 15:27, Paul Batum wrote: > Cool, glad to hear you've made progress. > > On Mon, Apr 20, 2009 at 1:58 PM, Heinrich Breedt > wrote: >> >> Seems I have been able to get it to work, just added some i

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Allen Wilson
Thanks...I read through it again and I did see the PropertyRef information you were referring to. Tried it and it still did not help my issue...the way the tables are set up there is a one to many relationshp...therefore i need the HasMany but without the field in table A being the primary key I a

[fluent-nhib] Re: Having trouble with Dynamic components

2009-06-19 Thread rob
So: -String.format doesn't help -declaring i at the start of the method doesn't help -i dont' have resharper installed, but I don't think the scope of i is the issue... -Yes, I agree that it has something to do w/ reflection and the way LINQ expressions are evaluated. Clearly i is being evaluated

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Hudson Akridge
Not sure where you're getting the HasManyToMany from. :) That thread is on the one-to-many from users to orders. Reread it if you could, you're looking for the PropertyRef() method. Or setting the accountid as your primary key in the mappings (you shouldn't need to change that in the database). On

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Allen Wilson
Tried to use the HasManyToMany and it actually caused the same problem that I have in another post. The relationship is not a HasManyToManythere can only be one ACCOUNT_ID in table (there is a unique index set on itto the poor design again). I need to use the HasOneToMany but be able to i

[fluent-nhib] Re: Having trouble with Dynamic components

2009-06-19 Thread James Gregory
Rob: Do you have Resharper installed by any chance? If so, does it complain about any scope issues with your i variable? On Fri, Jun 19, 2009 at 3:50 PM, Hudson Akridge wrote: > What I'm thinking is happening here, is that since linq stuff is all > deferred execution, when it's finally called, i

[fluent-nhib] Re: Having trouble with Dynamic components

2009-06-19 Thread Hudson Akridge
What I'm thinking is happening here, is that since linq stuff is all deferred execution, when it's finally called, i is out of scope and doesn't exist (the null ref exception he's getting). If there's a way to force mapping() to be evaluated immediately when it's referenced on DynamicComponent, tha

[fluent-nhib] Re: Problem with populating tablesq

2009-06-19 Thread Allen Wilson
No problem Here is the map: public class ApplicationInformation_Map : ClassMap, IMap { private string _table; public string Table { get { return _table; } } public ApplicationInformation_Map() { _table = "ACCOU

[fluent-nhib] Re: Having trouble with Dynamic components

2009-06-19 Thread James Gregory
I'm guessing it's something todo with the way the ReflectionHelper is working on it, so it may require a code change on our part. On Fri, Jun 19, 2009 at 3:05 PM, Hudson Akridge wrote: > Very strange. Have you tried perhaps an explicit i.ToString()? Or a > string.Format("property{0}",i)? > > > On

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Hudson Akridge
Deja vu :) http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/f6badbe4aca0803e?hl=en That thread should contain a couple solutions to what you're looking to do. Also, remember, since yo

[fluent-nhib] Establishing a relationship other than the Primary key

2009-06-19 Thread Allen Wilson
Hello I am trying to set up a relationship with HasMany In table A, I have the fields GUID_ACCOUNT_ID (primary key) and ACCOUNT_ID. In table B, I have the fields TRANS_ID and ACCOUNT_ID. The ACCOUNTID is a foreign key for ACCOUNT_ID in table A (yes...the table is somewhat badly designed

[fluent-nhib] Re: Problem with populating tablesq

2009-06-19 Thread Hudson Akridge
I have many tests running with SqLite and have not run into a problem like that. Could you perhaps post one of your tests, and also an example of your class data definition with mapping? That will help us in troubleshooting your issue :) On Fri, Jun 19, 2009 at 8:49 AM, Allen Wilson wrote: > > H

[fluent-nhib] Re: Having trouble with Dynamic components

2009-06-19 Thread Hudson Akridge
Very strange. Have you tried perhaps an explicit i.ToString()? Or a string.Format("property{0}",i)? On Fri, Jun 19, 2009 at 8:55 AM, rob wrote: > > Doesnt' work. If I used any variable or even a hardcoded integer (as > in x["properytname" + 3]) inside the x[...] statement I get the > error. > >

[fluent-nhib] Problem with populating tablesq

2009-06-19 Thread Allen Wilson
Hello... I am using Fluent NHibernate to work with a new system I am putting together and developing with Test-Driven Development (TDD). To conduct my test, I am using SQLite as the database end and I am having problems populating the tables. It looks like the error is due to using the Reference

[fluent-nhib] Re: Having trouble with Dynamic components

2009-06-19 Thread rob
Doesnt' work. If I used any variable or even a hardcoded integer (as in x["properytname" + 3]) inside the x[...] statement I get the error. On Jun 19, 4:15 am, James Gregory wrote: > What happens if you declare a variable that contains the property name? > > for (int i = 0; i < 1; i++) > { >  

[fluent-nhib] Re: Having trouble with Dynamic components

2009-06-19 Thread James Gregory
What happens if you declare a variable that contains the property name? for (int i = 0; i < 1; i++) { var propertyName = "property" + i; c.Map(x => x[propertyName], "columname" + i); } On Fri, Jun 19, 2009 at 1:15 AM, rob wrote: > > Hi- > > I'm using the latest release (524) of Fluent and

[fluent-nhib] Re: combining automapping and fluent mapping

2009-06-19 Thread James Crowley
Ok, thanks for the info guys! 2009/6/18 James Gregory > Yep, Mr. Akridge is correct. Unfortunately the two mapping styles are > entirely disparate currently, something we would like to change but it isn't > happening for a while yet. It's not normally a problem until it comes to > inheritance. >