Re: [hibernate-dev] and HBMBinder

2010-10-18 Thread Steve Ebersole
We should talk about what is required here to make sure it supports the use case(s) you need. "global" I assume means applying to all tags. That is doable. Currently, using the prelimiary code, that would look like: Map globalMeta = ...; Metadata metadata = ...; // Metadata is sorta, kida

Re: [hibernate-dev] On possible extensions for the validator

2010-10-18 Thread Federico Mancini
Ok now I see it. Using groups for cross-validation is a very nice solution to be able to reuse them on multiple sets of properties. Then in Emmanuel's example I guess it should be @AtLeastOneNotNullAmongst(groups={Group1.class,Group2.class}) B getB() { ... }; The @CrossValidation annotation at

Re: [hibernate-dev] and HBMBinder

2010-10-18 Thread Max Rydahl Andersen
It's used to allow injecting global meta tags when generating code via hibernate tools. Depending on how hibernate 4 refactoring goes we might not need it anymore...i.e. since hibernate tools would need a rewrite anyway ;0) /max On Oct 16, 2010, at 21:25, Steve Ebersole wrote: > HBMBinder.bi

Re: [hibernate-dev] On possible extensions for the validator

2010-10-18 Thread Hardy Ferentschik
I was also thinking about a generic class level @CrossValidation constraint. I think Emmanuel and I are thinking about the same thing here: @CrossValidations({ @CrossValidation(forGroup=BankAccount.class), @CrossValidation(forGroup=ContactDetails.class) }) public class BankAccountNumber

Re: [hibernate-dev] On possible extensions for the validator

2010-10-18 Thread Emmanuel Bernard
On 16 oct. 2010, at 10:56, Dag Hovland wrote: > On 15/10/10 13:33, Emmanuel Bernard wrote: > (...) >> That being said, I wonder whether you can write your approach atop a generic >> class-level constraint @CrossValidation that would look for the properties >> annotations and behave as expected.