On 2009-10-16 16.04, Niclas Hedhman wrote:
I am not sure that we are any different than ORM solutions, i.e. the collection contains (under the hood) the references to the entities and not the entities themselves. At least JDO 1.0 used a hollow internal implementation which contained the identities. Hibernate 2.x had a standard ArrayList populated with hollow proxies to be populated when accessed. Not sure if/how any of these allowed the many-association to be paginated other than with Hibernate's "direct SQL" approach, where the domain model is completely sidetracked.
I was thinking more of the storage model rather than the Qi4j model. Relational databases can use foreign keys so that you have lots of columns in a table that has the key set to the id of the ManyAssociation. Adding a new value to the collection is then O(1). In the JDBM case we will load the entire list, add to the end, and then write the whole thing down again, which is O(n). How to work around that I don't know. Again, Neo4j implements large collections using linked lists, which scales better, but can we use that approach too? And would it be the best way to do it?
/Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

