Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic