This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line! See this thread for details.
I able to generate the schema but when I try to insert, I am getting the error com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'id' cannot be null. My Phone table primary key is a composite key consisting of phoneNumber and foreign key id.
I have my classes as below
posted 6 years ago
The way I have the schema, I have id column in Phone table as both primary key and foreign key to Student table and its failing while trying to perform an insert. How can I get this to work? Below is from logs.