there is a strange error ocurring to me. I'm working with Hibernate, I have mapped class called Widget, 开发者_如何学运维which has a Parameter class, but when I try to insert I get "ORA-01400: cannot insert NULL into..."
The mapping is properly done as:
<bag cascade="none" inverse="true" lazy="false" name="parameters" table="PARAMS" >
<key column="WIDGET_ID" foreign-key="FK_PARAMS" not-null="true"/>
<one-to-many class="Parameter"/>
</bag>
The wierd thing is that the not-null property is setted to "true" which forces to insert the ID value of the Widget Object.
Thanks in advance
Did you solved the problem? I think I had the same problem
ORA-01400: Cannot insert null into (TABLE.COLUMN) (Hibernate)
In my case I solved modifying Db, making foreign keys also primary keys
精彩评论