Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Adam Koprowski

Greenhorn
+ Follow
since Oct 22, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Adam Koprowski

As a matter of fact adult-child was not a good example because I want the relation to be 1-1. So for the sake of the example, suppose every adult can only have 0 or 1 children ;-).
Hello,

I'm having a really silly problem but I really cannot handle it - can you guys please help?
I want to have two entity beans: Adult & Child, where every child should have two references to adult: mother & father. I want the relation to be bi-directional. Can anybody throw a few lines with the appropriate code? Because whatever I'm doing, I'm getting it all wrong.

Thanks a lot in advance!
Adam
Hello,
I'm having an issue with referencing an entity bean twice from other bean. Here's a simplified version of what I have:



Now, to begin with, is this allowed? If not, how can I achieve something like that? If so, then why am I getting errors while trying to delete objects of type Block? :-). I tried to play around with different cascading settings but nothing seems to help. I'm getting an error:

where the identifier is the key of the block which indeed occurs twice in the Items table, for two different items, but I do not see why should that be a problem.

Any help greatly appreciated!
Cheers,
Adam