I think that the question could be rephrased as: How to map a collection with elements of different classes? Am I asking for too much? Esteban A. Maringolo 2013/8/30 Esteban A. Maringolo <emaringolo@gmail.com>:
More or less, I have this working.
In the Group class I have a description named: descriptionMembers <mongoDescription> ^VOMongoToManyDescription new attributeName: 'members'; accessor: #members; kind: Member; beLazy; yourself
And in the Member class I have descriptionGroups <mongoDescription> ^VOMongoToManyDescription new attributeName: 'groups'; accessor: #groups; kind: Group; beLazy; yourself
But what if Member is an abstract class and the elements can be any of SingleMember or ComplexMember?, each one is stored in a separate collection in Mongo.
If I do specify #kind: Member in my #descriptionMembers it won't work.
Any ideas?
Regards,
Esteban A. Maringolo
2013/8/30 Esteban A. Maringolo <emaringolo@gmail.com>:
2013/8/30 James Foster <Smalltalk@jgfoster.net>:
It seems that I mistook the question for something easy enough for me to answer! Unfortunately, I don't have any knowledge of Voyage+MongoDB so can't really give the proper answer.
Thanks anyway, it is a problem you'll never find in GemStone/S ;-)