Closed plbrault closed 8 years ago
Good point. There might be some backwards compatibility concerns doing this, but you're right - the collection name should be prefixed with an underscore at least.
Sent from my iPhone
On Aug 24, 2015, at 11:25 PM, Pier-Luc Brault notifications@github.com wrote:
When an app already contains a collection named Transactions, the developers are forced to change its name before installing the package. I think that the collection created by the package should be renamed to something that is not a plain dictionary word to avoid any conflict.
— Reply to this email directly or view it on GitHub.
How about a config setting to chg name?
Good idea @ericoe
Agreed. Will make this option available in the next release.
Sent from my iPhone
On Aug 25, 2015, at 9:34 PM, Steve Bourgoin notifications@github.com wrote:
Good idea @ericoe
— Reply to this email directly or view it on GitHub.
In 0.7.5, the transactions collection can be specified in a settings.json
file in the project root:
{
transactionsCollection: "transactionRecords"
}
Thanks!
Does not work. Client still shows error: "ncaught Error: There is already a collection named "transactions". I think it's because the settings in settings.json is not accessible from client (it it is not in the "public" area).
Yes, I believe you're right. I'll accept a PR and republish if there's a solution for this.
On another note, if you're using this package to deal with money type transactions, I'd have to warn against it. Using this package is a step up from no db transactions, but it's not mature enough to have important data relying on its functionality.
I use it in a couple of production apps and, although it hasn't let me down, I know that it's no big deal if it ever does.
Thank you Yes, I've read your warning about using it in money treating apps. I want it for simpe purpose, for my own risk.
When an app already defines a MongoDB collection named
transactions
, the developers are forced to change its name after installing the package. I think that the collection created by the package should be renamed to something that is not a plain dictionary word to avoid any conflict.