JackAdams / meteor-transactions

App level transactions for Meteor + Mongo
http://transactions.taonova.com/
MIT License
113 stars 16 forks source link

Collides with SimpleSchema/Collection2 #37

Closed dnish closed 8 years ago

dnish commented 9 years ago

Hey, after adding the package, I get the following error if I try to add a document in one of my collections:

SimpleSchema.clean: filtered out value that would have affected key "last_message", which is not  allowed by the schema
[..same message for other fields..]

The affected collection doesn't have a Schema - also I didn't set {tx:true} or started a transaction at the beginning.

Before that insert, I do a insert into another collection, which has a Schema. This insert works without problems.

JackAdams commented 9 years ago

https://github.com/JackAdams/meteor-transactions/blob/master/lib/transactions-common.js#L1471 is the offending line of code. It's supposed to prevent schema from being automatically added to collections with no schema attached, but it's obviously not doing that. Should be an easy fix.

JackAdams commented 9 years ago

Okay, just released a new version that will, I hope, fix this. If it's not fixed, and you've got time, I'd really appreciate a simple repro so I can sort it out properly.