Skip to main content
mention saveAndFlush
Source Link
Martín Coll
  • 3.8k
  • 5
  • 40
  • 57

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.

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

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.

Bounty Awarded with 50 reputation awarded by Matt Ball
Source Link
Sergey Vedernikov
  • 7.8k
  • 2
  • 27
  • 27

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