On Sun, Nov 25, 2012 at 4:12 PM, Paul Bors <p...@bors.ws> wrote:
> Looks awesome!
>
> One suggestion/question about it (might sound silly at first but keep an
> open mind).
>
> I understand you're implementing the JSR-303, but I was wondering if it
> would be possible to allow some of the settings be borrowed from other
> annotation framework like Hibernate or some other 3rd party not necessary
> out of the box but perhaps via a user defined mapping?
>
> Given your example POJO:
> public class Person implements Serializable
> {
>        @NotNull
>        @Size(min = 2, max = 30)
>        private String name;
> ...
>
> If one were to use the same POJO to map it via Hibernate the code would look
> like:
> @Entity
> public class Person implements Serializable
> {
>        @NotNull
>        @Size(min = 2, max = 30)
>        @Column(name = "full_name", nullable = false, length=30)
>        private String name;
> ...
>
> That seems like duplicated meta data to me since you're defining the same
> info twice such as the null state and length in two or more different
> annotations.

i believe you are coming into this from the wrong angle. the
integration should not be between Wicket validation and hibernate
annotations, the integration should instead be between bean validation
(303) and hibernate annotations.

303 provides the validator and the metadata constraint discovery which
i use. if you choose to integrate between wicket and hibernate
annotations you have to basically build a parallel 303 implementation.

instead, figure out how to integrate hibernate annotations with 303
and you get to piggy back on everything thats already there.

-igor


>
> ~ Thank you,
>   Paul Bors
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Sunday, November 25, 2012 1:41 AM
> To: users@wicket.apache.org
> Subject: initial bean validation integration checked into experimental
> module
>
> just checked in a first pass on bean validation (jsr 303) integration.
> see this commit for details:
>
> https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=580a8dd9
> ;hp=2d47bf340875f6053aa2a3b69c4f442f2fbb03e1
>
> feedback is welome.
>
> -igor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to