Skip to content

NH-3554 - Docs - bidirectional, indexed collections #1165

Closed
@nhibernate-bot

Description

@nhibernate-bot

Roger created an issue — 14th October 2013, 12:52:10:

Hi

I was a bit surprised when a collegue of mine the other day said "it's a petty you cannot have bidirectional s in nhibernate". Didn't understand him - I've used it with no problems.
He was referring to
http://nhibernate.info/doc/nh/en/index.html#collections-bidirectional

Please note that NHibernate does not support bidirectional one-to-many associations with an indexed collection (list, map or array) as the "many" end, you have to use a set or bag mapping.

The docs should instead probably reflect Hibernate's doc in this matter...
http://docs.jboss.org/hibernate/orm/3.6/reference/en-US/html/collections.html#collections-indexedbidirectional


Daniel A. Schilling added a comment — 25th October 2013, 18:26:27:

YES The Hibernate documentation is much more accurate on this point, explaining the special steps you have to take to do a bi-directional relationship on a map or list, instead of incorrectly stating that it can't be done. I'm guessing that this problem in the documentation is probably responsible for this confusion: http://stackoverflow.com/questions/3398624/nhibernate-map-1-many-relationship-to-dictionary.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions