Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

254
Visualizações
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 Respostas
Responde à pergunta

0

Got it.... using the annotation:

@org.hibernate.annotations.Entity(
        dynamicInsert = true
)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda