I think the change to a property was the right move.
With regards to the convention, something like this should do the trick:
public class EnumHasManyConvention : IHasManyConvention,
IHasManyConventionAcceptance
{
public void Apply(IOneToManyCollectionInstance instance)
{
This will probably go against the grain, but ..
Personally I think it would be best to leave Lazy() alone and just
create another method ExtraLazy()
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Paul Batum
Sent: 11 Janu
Boz,
If TypeA always has null for the collection property, can you not just
move the property to the subclass TypeB, then all your problems go away:
class TypeA {
int Id;
string Name;
}
class TypeB : TypeA {
IList Children;
}
In your case you wouldn't need any extra members for the subclasses.
Yes lose the SubId.
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of tbushell
Sent: 17 December 2009 20:10
To: Fluent NHibernate
Subject: [fluent-nhib]
You need the Column method of the Key property, i.e.:
Instance.Key.Column(COLUMN_NAME);
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Doron Yaacoby
Sent: 16 December 2009 12:48
To: Fluent NHibernate
Subject: [f
Grabbed from S#arp Architecture latest release.
I will update to latest on trunk and see if that makes a difference.
If not will have a stab at fixing it (or at least creating a failing
test at the weekend if I get a chance).
From: James Gregory [mailto:jagregory@gmail.com]
Sent: 13 Nove
I have done something similar to this in my project.
Start by creating an AddressComponentMap class with a single static
method named Map like so:
public sealed class AddressComponentMap
{
public static void Map(ComponentPart part)
{
part.Map(x => x.AddressLine
in the fluent mappings for Company (it will override the
conventions/defaults)
>-Original Message-
>From: fluent-nhibernate@googlegroups.com [mailto:fluent-
>nhibern...@googlegroups.com] On Behalf Of Martin Hornagold
>Sent: Thursday, September 17, 2009 11:13 AM
>To: fl
I think the problem is you can't guarantee which order the conventions
are applied, so it is probably best to also put an acceptance criteria
on the Cascade All to ignore the CompanyType:
public void Accept(IAcceptanceCriteria
criteria)
{
criteria.Expect(x => x.Class != typeof
Sounds to me like you don't need subclasses of any kind.
You just need to tell FNH that DictionaryBase is a base type.
If you are using S#arpArch you then modifying the IsBaseTypeConvention method
in the AutoPersistenceModelGenerator to the following should do the trick:
private bool IsB
James Gregory
Sent: 03 June 2009 08:36
To: fluent-nhibernate@googlegroups.com
Subject: [fluent-nhib] Re: Problems with guid primary keys and
WithTable()
That's a lot of steps, we should probably try to simplify that at some
stage. Nice work though.
On Mon, Jun 1, 2009 at 3:37 PM, Martin Horn
Brian,
The steps to solving your problem are as follows:
1. Change your default primary key convention to only accept integral
types and or ignore anything assigned by the AssignedKeyConvention:
public bool Accept(IIdentityPart target)
{
return !(new AssignedIdConvention().Ac
No its all to do with NHibernate.Validator by the looks of it.
I think you would be best trying that group Craig.
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of James Gregory
Sent: 27 May 2009 11:45
To: fluent-nhibernate@googlegroups.com
Subje
Actually I think this an FNH issue, or a lack of understanding of the
conventions at least.
I assume that you have an IClassConvention to apply the pluralizer.
This does what it says on the tin it only applies it to class maps or
AutoMaps not to joined subclasses.
You need to also implement a
This is because AutoJoinedSubclass does not implement IJoinedSubclass.
I raised this wayback and submitted a patch, but it never got applied.
Until this is fixed you can't use conventions with AutoJoinedSubclass
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-n
This is a S#arp arch issue.
I have raised it on the S#arp arch list here:
http://groups.google.com/group/sharp-architecture/browse_thread/thread/1
1f4ef8b02ce621f?hl=en
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of F
2. loop through each mapping and apply any overrides that relate
to the type or its base type
3. Apply the conventions
What do others think?
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Martin
I have just checked and this is a bug.
Neither AutoMappingOverrideAlteration.Alter or ForTypesThatDeriveFrom do
any checks for IsBaseType (or the new IsConcreteBaseType)
and so will create a class mapping for the base type.
I will try to come up with a patch, although I am not sure that it is
tha
The Wiki says to use an IComponentConvention.
The easiest way to do it to is use the GetComponentColumnPrefix setup
expression within your WithSetup on the AutoPersistenceModel
.WithSetup(setup =>
setup.GetComponentColumnPrefix = property => property.Name);
I’m not sure if this method w
all?
On Apr 16, 9:40 am, "Martin Hornagold"
wrote:
> The trouble with burying logic like that in the apply methods is that it
> makes it less maintainable.
> In the case of your Email string length this is clearly a new different
> convention.
> By having separate con
You cannot check whether the attribute has been set by another convention as
you cannot guarantee the order the conventions are applied.
This would work if you were setting the edge case in the mapping overrides.
But again this is putting logic in the wrong place.
The overrides are not convention
by
convention?
On Apr 16, 8:44 am, "Martin Hornagold"
wrote:
> 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
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
, I'd love to see a simple
example.
--
Jeremy Wadsack
On Wed, Apr 15, 2009 at 8:26 AM, Martin Hornagold
wrote:
Malcolm,
I know it is off topic. But if this is a real project it may be worth
looking at your design and making it a uni-directional association.
The model as shown belo
Malcolm,
I know it is off topic. But if this is a real project it may be worth
looking at your design and making it a uni-directional association.
The model as shown below means an ingredient can only be used in one
recipe ;)
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern.
in revision 441 and closed out your issue. Thanks for the patch
Martin :)
On Thu, Apr 2, 2009 at 10:48 AM, James Gregory
wrote:
Im not in a position to apply anything until Sunday, but if nobody
else has done it by then I'll apply it.
On 4/2/09, Martin Hornagold wrote:
>
> Previou
Jon,
I think you've got your frameworks mixed up.
IRepository is in S#arpArch :)
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Jon Kruger
Sent: 02 April 2009 16:04
To: Fluent NHibernate
Subject: [fluent-nhib] Adding F
Previous patch was incomplete.
I have updated the issue and the patch:
http://code.google.com/p/fluent-nhibernate/issues/detail?id=179
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To po
James,
I have added an issue with a patch to fix:
http://code.google.com/p/fluent-nhibernate/issues/detail?id=179
I would be grateful if you could consider adding it to the trunk.
Martin
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.
gh, because that'll
conflict.
On Mon, Mar 30, 2009 at 4:48 PM, Martin Hornagold
wrote:
Seems fair to me.
@PaulYoder, if you can't wait for the rewrite you could add your own
extension method like so:
public static class FluentNHExtensions
{
public static IProp
Seems fair to me.
@PaulYoder, if you can't wait for the rewrite you could add your own
extension method like so:
public static class FluentNHExtensions
{
public static IProperty ColumnNames(this IProperty property,
params string[] columnNames)
{
property.
you could apply it to the
trunk
Martin
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Martin
Hornagold
Sent: 25 March 2009 12:55
To: fluent-nhibernate@googlegroups.com
Subject: [fluent-nhib] Re: IJoinedSubClassConvention never called
fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Martin
Hornagold
Sent: 25 March 2009 16:27
To: fluent-nhibernate@googlegroups.com
Subject: [fluent-nhib] Re: .WithTable in IAutoMappingOverride doesn't
override IClassConvention
James/Billy,
Attached is a pa
12:04 PM, Martin Hornagold
wrote:
James,
The only other thing of note is that my initial description of the
inheritance hierarchy is slightly lacking.
I have my own Base classes which inherit from EntityWithTypedId from
S#arp so the actual inheritance hierarchy is as f
|
BaseEntityWithTypedId
|
BaseEntity : BaseEntityWithTypedId
|
Person
|
Author
Martin
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Martin
Hornagold
Sent: 25 March 2009 11:58
To: fluent-nhibernate@googlegroups.com
Subject
(IJoinedSubclass target)
{
target.SetAttribute("test", "true");
}
}
On Tue, Mar 24, 2009 at 10:28 AM, Martin Hornagold
wrote:
FYI, I just tried removing the override and it still never gets called.
-Original Message-
From: fluent-nhibernate@g
dSubclassConvention :
IJoinedSubclassConvention
{
public bool Accept(IJoinedSubclass target)
{
return true;
}
public void Apply(IJoinedSubclass target)
{
target.SetAttribute("test", "true");
}
}
On Tue, Mar 24, 2009 at 10:28
Billy,
I agree with James.
The beauty of the new conventions system is that you can selectively
apply conventions to classes.
I notice from your comment about class exclusions and your comments in
the PrimaryKeyConvention class in S#arp that you seem to be shying away
from this.
I have be
FYI, I just tried removing the override and it still never gets called.
-Original Message-
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Martin
Sent: 24 March 2009 10:15
To: Fluent NHibernate
Subject: [fluent-nhib] IJoinedSubClassConvent
James,
Thanks. Figured as much, just wanted to check I wasn't missing anything.
Is it worth any of us investigating promoting components to first class
citizens on the trunk?
Or do you think this is something that should be left for the rewrite?
Martin
From: fluent-nhibernate@googlegr
James,
I am having a slight problem with Id conventions.
This is my approach on trying to get the S#arp architecture (northwind)
sample application to work with the new conventions:
public class PrimaryKeyNameConvention : IIdConvention
{
public bool Accept(IIdentityPart targe
Superb, many thanks for the prompt response.
Loving the new conventions, much cleaner implementation.
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of James Gregory
Sent: 12 March 2009 12:11
To: fluent-nhibernate@googlegroups.com
Subject: [fluen
S#arp Architecture users are using the simple sanity check from Ayende:
http://ayende.com/Blog/archive/2006/08/09/NHibernateMappingCreatingSanit
yChecks.aspx
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of James Gregory
Sent: 10 March 200
YE!!
Fantastic. We are not worthy James.
This will likely solve all my slightly uneasy feelings about conventions
and prevent further hair loss due to head scratching.
Can't wait to get my hands on it
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googl
44 matches
Mail list logo