rnate@googlegroups.com
> [mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Berryl Hesh
> Sent: 16 April 2009 19:40
> To: Fluent NHibernate
> Subject: [fluent-nhib] Re: conventions & overrides
>
> I hear you. Maintenance is my goal too so even though it seems more
> maintainable to m
with when you have
clearly defined conventions with descriptive names.
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Berryl Hesh
Sent: 16 April 2009 19:40
To: Fluent NHibernate
Subject: [fluent-nhib] Re: conventions
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Berryl Hesh
Sent: 17 April 2009 04:55
To: Fluent NHibernate
Subject: [fluent-nhib] Re: conventions & overrides
Rei
That's exactly the sort of logic I was looking for (maybe without the
magic "string" though). But, no, it do
Rei
That's exactly the sort of logic I was looking for (maybe without the
magic "string" though). But, no, it doesn't work properly. Should it?
Thx!
Berryl
On Apr 16, 9:22 am, Rei wrote:
> Can you check if the "length" attribute has been set with the
> HasAttribute method of the IProperty in t
Can you check if the "length" attribute has been set with the
HasAttribute method of the IProperty in the Accept method and only
return true if it has not been set?
Something like
public bool Accept(IProperty property) {
return property.HasAttribute("length");
}
On Apr 16, 5:21 pm, Berryl H
Would this help:
public bool Accept(IProperty property) {
return !property.HasAttribute("length");
}
So the convention will only be applied if the length attribute was not
previously set.
/Rei
On Apr 16, 6:09 pm, Berryl Hesh wrote:
> I think I like it better having one convention for like
s it makes that statement explicitly and
> easier to see what is going on.
>
> -Original Message-
> From: fluent-nhibernate@googlegroups.com
> [mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Berryl Hesh
> Sent: 16 April 2009 17:10
> To: Fluent NHibernate
> S
.
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Berryl Hesh
Sent: 16 April 2009 17:10
To: Fluent NHibernate
Subject: [fluent-nhib] Re: conventions & overrides
I think I like it better having one convention for
I think I like it better having one convention for like items (ie,
string lengths), like this:
public void Apply(IProperty property) {
if (property.Property.Name == "Email") {
property.WithLengthOf(30);
return;
}
property.WithLen
Berryl,
The best way I have found is to create a separate property convention
for the edge case.
In this property convention create a static Accepts method to allow
cleaner calling of it from the default convention:
public class EmailStringLengthConvention : IPropertyConvention
{
public
You're on the right track.
On Thu, Apr 16, 2009 at 11:21 AM, Berryl Hesh wrote:
>
> Please forgive me if the answer to this should be obvious from the
> docs.
>
> I'm using AutoMapping w/ conventions, and I have an override class.
> The case I'm asking about happens to be re: StringLength but I'
11 matches
Mail list logo