I created an entity class that has the same properties as project.java, and created a class where I can persist the entity object. Also, I created a database using databases in Netbeans using embedded JDBC
. I have the persistence.xml
, which provides the properties to connect the db, and is used the persitence class on entitymanagerfactory
object. The connection seems fine but I am having Internal Exception: java.sql.SQLIntegrityConstraintViolationException: Column 'PROJECT_ID' cannot accept a NULL value.
error.
Is it ok to create the db manually (executing the ddl) or should I create the table in the persistence.xml
using property name="javax.persistence.jdbc.url"" value="create-tables
?
Regards