• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate One To Many Not Null

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys i am learning hibernate. can somebody give me a hand.

i am trying to implement one to many. relationship unidirectional.
i have the following structure on my database.
laboratorios could have 1..N lineas


Java Code Laboratorios


Java Code Lineas


It works OK. only when in detail table(Linea) linea.codigolaboratorioii line null. (allows NULLS).

if i put linea.codigolaboratorioii as not null. gives me the next error. el valor null para la columna «codigolaboratorioii» viola la restricción not null
the value for the column codigolaboratorioii violate constraint not null.

is wrong put a foreing key as not null???

in others words codigolaboratorioii character varying(15) IS OK.
in others words codigolaboratorioii character varying(15) not null, the value for the column codigolaboratorioii violate constraint not null. .

thanks a lot
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the ORM forum.
 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Wouter Oet wrote:Moved to the ORM forum.



i post a self explaining video at megaupload http://www.megaupload.com/?d=W0UZK5UL just 1.37 Mb. please watch it.

thanks a lot
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't use videos. Just describe your problem.
 
reply
    Bookmark Topic Watch Topic
  • New Topic