java - Hibernate Id Sequence Resulting null -


  1. i have 1 table in postgresql database 2 id sequence.

    @jsonproperty("id") @column(name = "id", nullable = false,unique=true) @id @generatedvalue(strategy = generationtype.identity,generator = "order_seq_gen") @sequencegenerator(name = "order_seq_gen", sequencename ="order_id_seq")

    private integer id; @jsonproperty("state") private string state;  @jsonproperty("order_id") @column(name="order_id", nullable=false, unique=true, insertable = false,    updatable = true,         columndefinition = "bigint default nextval('order_idgen_seq')" ) @generatedvalue(strategy = generationtype.sequence,generator = "order_seq_gen") @sequencegenerator(name = "order_seq_gen", sequencename ="order_idgen_seq") private integer orderid; 
  2. this pojo.

  3. my issue orderid, if call crud repository save creating new record sequence starting values,

  4. while returning object orderid resulting null there in table.

  5. i have checked pojo , column mapping fine i'm not getting went wrong.

  6. another id sequence returning without issue while coming orderid resulting null.

  7. please me solve this, thankful them.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -