mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing AggregaAttribute for NH3
--HG-- branch : 1.x
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using FluentNHibernate.Automapping;
|
||||
using FluentNHibernate.Automapping.Alterations;
|
||||
using FluentNHibernate.Mapping;
|
||||
using Orchard.Environment.ShellBuilders.Models;
|
||||
|
||||
namespace Orchard.ContentManagement.Records {
|
||||
@@ -221,7 +222,7 @@ namespace Orchard.ContentManagement.Records {
|
||||
}
|
||||
|
||||
public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
|
||||
throw new NotImplementedException();
|
||||
return _getMethod.GetCustomAttributes(attributeType, inherit);
|
||||
}
|
||||
|
||||
public override int MetadataToken {
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using FluentNHibernate.Conventions;
|
||||
using FluentNHibernate.Conventions.AcceptanceCriteria;
|
||||
using FluentNHibernate.Conventions.Inspections;
|
||||
@@ -18,12 +19,11 @@ namespace Orchard.Data.Conventions {
|
||||
}
|
||||
|
||||
public void Accept(IAcceptanceCriteria<IManyToOneInspector> criteria) {
|
||||
// todo
|
||||
// criteria.Expect(x => x.Property != null && x.Property.IsDefined(typeof(AggregateAttribute), false));
|
||||
criteria.Expect(x => x.Property != null && x.Property.MemberInfo.GetCustomAttributes(typeof(AggregateAttribute), false).Any());
|
||||
}
|
||||
|
||||
public void Apply(IOneToManyCollectionInstance instance) {
|
||||
instance.Fetch.Select();
|
||||
instance.Fetch.Join();
|
||||
instance.Cache.NonStrictReadWrite();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user