one-to-one

prevent insert while select query, hibernate

Hi, new to hibernate. I have a problem that when i am trying to run select query say "from Foo where Foo.some_id=2" (with hibernate template) then hibernate is also tries to insert the records in a table 'Foo2' that has a one-2-one association with the Foo table Bean Foo class Foo{ int id; .... Foo2 foo2; } Foo.hbm.xml ... <one...

Function one-to-one and onto from set to an other

Hello, I saw somewhere that if we have a one-to-one function from sets X to Y mean that we have a onto function from Y to X. I can't understand it !! Someone can explain ?? ...