Why JPA 2.0 annotations does not validate user inputs?

Solution Verified - Updated -

Issue

I'm using JPA 2.0 and some annotations like @Column(nullable=false) don't validate user inputs. Only when I add Bean Validation in my project and @NotNull annotation. Is this the expected behavior?

Environment

  • JBoss Enterprise Application Platform (EAP) 6.x
  • JPA 2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.