Hi
I'm not sure if my problem is solvable in a more or less comfortable way.
There is a class Person which has mapped 'hasOne' a participant.
The person has a birthday but this field is not required on the person itself. But if I would like to add a participant to the person then the birthday is required.
How to get rid of this
- move the birthday information to the participant object -> That's how I did it for now, but I think moving person related information to other objects cannot be the final solution
- Map the property in both classes -> how to tell the validator when it's required and when not?
- Merge the two objects -> for now not allowed
Maybe someone has a better idea, I use the nHibernate Validator and there I configure the validation in the class (where the information 'birthday' is not a property on both - maybe this would be a solution?)