Open EugeneKostrikov opened 9 years ago
One other thing to validate is when some reference field is used by two "inverse" fields.
app.resource('user', {
addresses: [{ref: 'address', inverse: 'user'}],
estate: [{ref: 'address', inverse: 'user'}]
});
app.resource('address', {
user: {ref: 'user', inverse: 'addresses'}
})
The same applies to the case when single reference is used from two different resources:
app.resource('user', {
address: {ref: 'address', inverse: 'user'}
});
app.resource('address', {
user: {ref: 'address' inverse: 'address'}
});
app.resource('pet', {
user: {ref: 'user', inverse: 'address'}
})
There's nothing to warn about misconfiguration and typos. One of the most annoying examples - wrong reference name that doesn't show up until you try to create compound resource.