New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declared has_list().to() does not produce the reciprocal has_one().from() #3
Comments
Using a has_list and has_one will never work together, one is for outgoing relationships and the other for one relationship with linked list. class B I guess it does not work - have never tried. |
It should be |
You are right, of course. I got the impression that has_list was just has_n with an order parameter, but Neoclipse tells me otherwise. Thanks, and sorry for raising an issue about it. |
In an almost related comment; assigning a node to a has_one relationship does not delete the previous relationship. This does not seem to me like the behaviour most people would expect, but again, I'm new to the library. As an example, the following script prints "1 2", whereas simply "2" might be more intuitive:
|
Yes, you are right. I'm not sure what the expected behaviour would be. |
Funny last sentance ... - If we reassign the relationship what should happen with the old relationship - should it get deleted ? |
I think it should be deleted without throwing an exception. If the current state is node polygamy, throwing an exception would be like forbidding divorce. Seems more natural to me just to let the node replace one relationship with the other. My code is currently using this for has_one assignments:
|
Cool. Thanks! |
This short script illustrates the problem that (I think) is happening with has_list. Replacing that call with has_n makes the code work as expected.
The text was updated successfully, but these errors were encountered: