Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

255
Vistas
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 Respuestas
Responde la pregunta

0

Got it.... using the annotation:

@org.hibernate.annotations.Entity(
        dynamicInsert = true
)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda