Hi,

Is there a form to specify a multi-property constraint?

I'd tried with the same value in UniqueKey for two properties but
don't work, say i have the next object

public class MyEntity
{

[Property(UniqueKey="MY_KEY", Unique=true)]
public string PropertyA { get; set; }

[Property(UniqueKey="MY_KEY", Unique=true)]
public string PropertyB { get; set; }

.... more properties

}

but it trhows an exception when i'd tried to save an object, say i
have [new MyEntity { PropertyA = "aValue", PropertyB =
"anotherValue" } ] this saves fine, but  if i try to save  [new
MyEntity { PropertyA = "aValue", PropertyB = "okAnother" } ] it throws
an exception argumenting that the value already exist (PropertyA =
"aValue").

Can someone help me with this?

Thanks

P.S. sorry for my english  =P
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to