I have here the behaviour that in one of my collection the _type
field was not populated, what in my case is really needed.
scenario 'User edits a session' do
session = survey.sessions.create version: version, token: 'xxx'
produces a database entry like that without , _type: 'Helena::Session'
...
{ _id: ObjectId("5458f7b16861632f09020000"),
token: "xxx",
version_id: ObjectId("5458f7b16861632f09010000"),
completed: false, survey_id: ObjectId("5458f7b16861632f09000000"),
updated_at: ISODate("2014-11-04T15:58:41.541Z"),
created_at: ISODate("2014-11-04T15:58:41.541Z"),
view_token: "VEXfJNjyr3yI4GIziqTxrsHC9" }
I explicit have to pass the type. Is there a way to enforce the _type
even if it's not a derived object?