foam-framework / foam

Feature-Oriented Active Modeller
Apache License 2.0
786 stars 55 forks source link

Add warning when primary key choice for a model will be ignored #373

Open jacksonic opened 9 years ago

jacksonic commented 9 years ago

Attempting to use ids: ['something'] when extending another model or using traits doesn't produce the expected result. This does make sense, since changing the primary key in a sub-model is dubious, and could be better handled by implementing a property called 'id'.

However a warning to the developer that they have an id assignment that will be ignored would save a lot of headaches. If we do want to allow the primary key to be changed, then this is a bug in buildPrototype().