descriptorForInsider: aDescriptor | table | table := self insidersTable. aDescriptor table: table. (aDescriptor newMapping: DirectMapping) from: #id to: (table fieldNamed: 'id'). (aDescriptor newMapping: DirectMapping) from: #name to: (table fieldNamed: 'name'). (aDescriptor newMapping: DirectMapping) from: #style to: (table fieldNamed: 'style'). (aDescriptor newMapping: OneToManyMapping) attributeName: #trades; orderBy: #date; join: (Join from: (table fieldNamed: 'id') to: (self insiderTradesTable fieldNamed: 'insider_id')). --- classModelForInsider: aClassModel aClassModel newAttributeNamed: #id; newAttributeNamed: #name; newAttributeNamed: #style; newAttributeNamed: #trades collectionOf: InsiderTrade