OK, I'm totally frustrated. I can't thing one in or out of this database.
I want the root to act like a dictionary - so I set it up like this:
| set | set := (MagmaSet equivalenceAttributes: (Array with: #key)). set addIndex: (MaSearchStringIndex attribute: #key). MagmaRepositoryController create: 'magma' root: set.
I start the server session on a port and leave it. In the client I subclass MagmaSession to add schema specific methods. One thing I add is this:
MyDatabaseSession>>at: aSymbol ifAbsentPut: aBlock
| collection assoc | collection := (self root where:[:ea | ea key = aSymbol]). collection isEmpty ifTrue: [self root add: (assoc := aSymbol->(aBlock value))] ifFalse: [assoc := collection first]. ^assoc value.
This fails on a newly created database because MaCollectionReader isEmpty ends up calling sortIndex on a MaQueryTrunk which doesn't seem to understand it.
What gives?