You're absolutely right about what's happening. When an object of an embedded class is null, Hibernate represents this by making all its columns null in the database; unfortunately, this means Hibernate can't tell the difference between a null embeddable object and an embeddable object with all null values.

As far as I know, if you can't make the field nullable (by making it an Integer, as you guessed), the only way around this is to create a custom Hibernate type. Should be doable, but it'll be a pain to do it that way. In fact, it'd likely be worse than whatever the reason is you can't use an Integer — so what is that reason, anyway?

Hibernate does not allow an embedded object with an int field to be null?
Problem: 
Can&#39;t delete image in contenteditable div on Android

Only known solution at the moment:
Android: Backspace in WebView/BaseInputConnection

Problem with solution:
Setting:  creating a BaseInputConnection using the regular constructor seems to disable speech to text from functioning correctly.  as opposed to using WebView.onCreateInputConnection(EditorInfo) to generate an InputConnection.

any ideas how to remedy this?
