I found that `@Column(columnDefinition="serial")` works perfect but only for PostgreSQL. For me this was perfect solution, because second entity is "ugly" option.

A call to `saveAndFlush` on the entity is also necessary, and `save` won't be enough to populate the value from the DB.