Validator ValidateFieldValue when related entity is set.

Posts   
 
    
Brandt
User
Posts: 142
Joined: 04-Apr-2007
# Posted on: 15-Feb-2009 04:37:42   

I have a quick question.

Lets say I have these two entities

Customer

CustomerId (pk) Name

Order

OrderId (pk) CustomerId (fk) etc.

I have a validator class for the OrderEntity which overrides ValidateFieldValue. When I set the CustomerId property of the OrderEntity the ValidateFieldValue method in the validator runs. However when I set the Customer property which in turn sets the CustomerId property, the ValidateFieldValue does not run. Is this intended and why?

Thanks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 15-Feb-2009 20:14:18   
David Elizondo | LLBLGen Support Team
Brandt
User
Posts: 142
Joined: 04-Apr-2007
# Posted on: 15-Feb-2009 20:18:19   

daelmo wrote:

Here is why and some explanation: http://llblgen.com/TinyForum/Messages.aspx?ThreadID=7398

Thanks, I was sure the reason was out there but my 15 min of searching couldn't find it. Thanks for locating that for me.