Open Tronix117 opened 7 years ago
Class side :
export const Class = store.defineMapper('Class', {
schema: ClassSchema,
endpoint: 'classes',
relations: {
hasMany: {
'AppUser': {
localKeys: 'userIds',
localField: 'users'
}
}
}
})
User side :
export const AppUser = store.defineMapper('AppUser', {
schema: AppUserSchema,
endpoint: 'users',
relations: {
hasMany: {
'Class': {
foreignKeys: 'userIds',
localField: 'classes'
}
}
}
})
ManyToMany needs to be implemented.
Proposed Implementation