Thursday 11 February 2016

Inheriting Mongoose schemas

So I wanted to make a base Entity Schema, and other model entities would inherit from it. I did it, kinda, but then strange thing happened. Those are my schemas: AbstractEntitySchema -MessageSchema -UserSchema -RoomSchemaFile: http://ift.tt/20rrf2P in MongoDB, they are all saved in the same document store: 'entity models' not separate ones, like Messages, Users..Did I get what was supposed to happen, but not what I wanted, separate stores?If so I will just make a basic JSON/object as entity and append the appropriate properties for each entity. Or is there a better way?Thanks.

Submitted February 11, 2016 at 10:43PM by mihaelamj

No comments:

Post a Comment