Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
postgres table is not showing default values

I'm stuck with a weird programming problem. I've defined a schema where if no values are passed for a column (column name is Title) then a default value (Harry) will be used.

Title | character varying(64) | default 'Harry'::character varying

And, I'm trying to insert entries using hibernate through my java application.

What's happening is that hibernate is explicitly giving null value to that column in any query and thus the default value is not showing up in the table for those entries.

Just like to mention here that when I execute any insert sql query myself without passing any value for that column then I'm able to see the default value in the corresponding row !

So any pointer on how to handle this hibernate-postgres case ??

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Got it.... using the annotation:

@org.hibernate.annotations.Entity(
        dynamicInsert = true
)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!