This works for me in 7.0.1:

public class BaseDto implements Serializable {

    /**
     * Serial UID.
     */
    private static final long serialVersionUID = 6528044487061552972L;
    /**
     * Customer GUID.
     */
    @NotNull
    @SuppressWarnings("checkstyle:magicnumber") // No need for constants
here
    @Size(min = 36, max = 36)
    private String customerGuid;
    /**
     * MAS/ODN IP address.
     */
    @NotNull
    private String hostName;

    /**
     * Default constructor.
     */
    public BaseDto() {
        super();
    }

    /**
     * Construct DTO and populate params.
     *
     * @param customerGuid Customer GUID.
     * @param hostName MAS/ODN IP address.
     * @param maxAgeMs Maximum age in MS.
     * @param transId Transaction ID.
     */
    @ConstructorProperties({"customerGuid", "hostName", "maxAgeMs",
"transId"})
    public BaseDto(final String customerGuid, final String hostName,
            final Long maxAgeMs, final Long transId) {
        this.customerGuid = customerGuid;
        this.hostName = hostName;
        this.maxAgeMs = maxAgeMs;
        this.transId = transId;
    }

Then:

public class CustStbDto extends BaseDto {

    /**
     * Serial UID.
     */
    private static final long serialVersionUID = 854397785671571437L;

    /**
     * Account Id.
     */
    @NotNull
    private String accountId;

On Mon, Sep 19, 2016 at 4:23 AM, hwaastad <he...@waastad.org> wrote:

> Hi,
> quick check with you guys regarding jax-rs validation.
>
> if I do a @valid in a simple model validation is ok
>
> However, if I extend this model, validation is not working on submodel.
>
> https://github.com/hwaastad/TomeeJaxrsValidation.git
>
> in 1.7.x this is working with "ejb strategy".
>
> br hw
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/7-0-1-and-validation-tp4680145.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>



-- 
Steven P. Goldsmith

Reply via email to