Hello ,
Am new to JPA / Hibernate / ORM
Facing a strange issue .
1 >Created a simple table in HSQLDB
2 >Then using JPA tried persisting the data - and it worked fine
Here in DB had not defined the primary key explicitly
Now I tried to use the "Embedded" attribute
( Single Table - but two
Java objects )
The problem that I am facing is that if I use :
it works fine
For other options ( AUTO , IDENTITY ) get the exception ::
Caused by: java.sql.SQLException: Attempt to insert null into a non-nullable column: column: CUST_ID
Can anyone provide some pointers related to ::
1 >
when I dont use @embedded & @Embeddable I can simply do an insert using GenerationType.AUTO - This works
2 >
when I use @embedded & @Embeddable I CANNOT do an insert unless I use
GenerationType.SEQUENCE
Thanks ,
anagha