What steps will reproduce the problem?
1. Create an entity implementing IEntityWithTypedId<IdT>.
2. Create another entity which references the first entity. (ie:
ProvinceState would have a Country property).
3. Configure the second entity to use an HasUniqueDomainSignature attribute
and configure the property of the first entity (ie: Country) to be the
DomainSignature.
4. Trigger the isValid() method. You will get an exception stating that
they EntityDuplicateChecker does not know check the value for duplicate
entries.
What is the expected output? What do you see instead?
The validation should compare the Id of the first entity (ie: Country).
What version of the product are you using? On what operating system?
1.0 RTM
Please provide any additional information below.
The problem is caused because of an error in the EntityDuplicateChecker.cs
class. The specific error is in the private void
AppendSignaturePropertyCriteriaTo<IdT>(ICriteria, IEntityWithTypedId<IdT>)
method and occurs on line 44.
The current code is:
else if (propertyType.IsSubclassOf(typeof(Entity))) {
AppendEntityCriteriaTo(criteria, signatureProperty,
propertyValue);
}
and it should be:
else if
(propertyType.IsSubclassOf(typeof(IEntityWithTypedId<IdT>))) {
AppendEntityCriteriaTo(criteria, signatureProperty,
propertyValue);
}
Original issue reported on code.google.com by goo...@deap.ca on 17 Aug 2009 at 5:12
Original issue reported on code.google.com by
goo...@deap.ca
on 17 Aug 2009 at 5:12