[fluent-nhib] Re: Urgence:How to map this situation?

2009-02-09 Thread James Gregory
Hey Levin, I've just committed a change that should hopefully fix this problem for you. Let me know how it works out. On Thu, Feb 5, 2009 at 1:40 PM, Levin wrote: > > Expect for that:) > > On Feb 5, 8:10 pm, James Gregory wrote: > > Support for using variables in a where clause isn't implemente

[fluent-nhib] Re: Urgence:How to map this situation?

2009-02-05 Thread Levin
Expect for that:) On Feb 5, 8:10 pm, James Gregory wrote: > Support for using variables in a where clause isn't implemented, as the > exception says. > I'll put this on my list of things todo. > > On Thu, Feb 5, 2009 at 11:49 AM, Levin wrote: > > >It says NotImplementedException: > >

[fluent-nhib] Re: Urgence:How to map this situation?

2009-02-05 Thread James Gregory
Support for using variables in a where clause isn't implemented, as the exception says. I'll put this on my list of things todo. On Thu, Feb 5, 2009 at 11:49 AM, Levin wrote: > >It says NotImplementedException: >--TargetInvocationException >at System.RuntimeMethodHandle._

[fluent-nhib] Re: Urgence:How to map this situation?

2009-02-05 Thread Levin
It says NotImplementedException: --TargetInvocationException at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType) at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, R

[fluent-nhib] Re: Urgence:How to map this situation?

2009-02-04 Thread James Gregory
Care to share what the exception is? On Wed, Feb 4, 2009 at 9:10 AM, Levin wrote: > > Well,the where clause works nicely,but there's a strange issue... > I do as below in my PostMap class,it throws exception in my unit test >public PostMap() { >... > HasMany(x=>x.

[fluent-nhib] Re: Urgence:How to map this situation?

2009-02-04 Thread Levin
Well,the where clause works nicely,but there's a strange issue... I do as below in my PostMap class,it throws exception in my unit test public PostMap() { ... HasMany(x=>x.Comments) .WithKeyColumn("ObjID") .Where(x => x.ObjType == Com

[fluent-nhib] Re: Urgence:How to map this situation?

2009-01-30 Thread Levin
Thanks for your help,i will make a try tonight,and post my response here later on:) Thanks again! On Jan 30, 5:21 am, James Gregory wrote: > Well, the Where statement is now mapped. > If ObjType is in your class (and you are using the default column name) you > can do this: > > HasMany(x => x.Co

[fluent-nhib] Re: Urgence:How to map this situation?

2009-01-29 Thread James Gregory
Well, the Where statement is now mapped. If ObjType is in your class (and you are using the default column name) you can do this: HasMany(x => x.Comments) .Where(x => x.ObjType == "Product"); If it isn't in your object, or it is but the name differs from the database column, then you should do

[fluent-nhib] Re: Urgence:How to map this situation?

2009-01-28 Thread James Gregory
I'm not entirely sure how you'd map this using standard hbm, but I think it'd probably involve the where attribute on the collection. We currently don't explicitly support where, so you'll have to fudge it. I'd do it something like: public class CommentMap : ClassMap { public CommentMap() {