This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate One To Many Not Null

 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the ORM forum.
 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • 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
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't use videos. Just describe your problem.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic