mongoose ~ simple example ~ does nothing

瀏覽次數:25 次
跳到第一則未讀訊息

Steve Lyle

未讀,
2017年4月27日 晚上10:03:282017/4/27
收件者:Mongoose Node.JS ODM
http://stackoverflow.com/questions/43670390/mongoose-simple-example-does-nothing/43670692#43670692

from the answer.

OH MY @@@ GAWD.

My collection on mongodb was named countryCode ~ capital 'C'. 

And Mongoose couldn't see until I renamed it countrycode

Mongoose debug turned on also didn't report anythiing.


Terrible design that enforces such case sensitivity ACROSS systems.

Also, this little flaw of design is NOT compliant with mongodb. 

After changing the 'C' to 'c' I have to change my query in mongodb to db.getCollection('countrycodes').find({}). In mongoDB case has to match

Mongoose throws that rule out and enforces everything be lower case. 

Kind of like how MS Entity Frameworks enforces that draconian rule of entities have to be in plural naming conventions.


That's all so ... IMO Mongoose lends to good reason to use MS SQL Server. Tell them I said so.


Steve Lyle

未讀,
2017年4月27日 晚上10:30:072017/4/27
收件者:Mongoose Node.JS ODM
Another script kiddie flaw.

If you try to query mongo without first connecting mongoose ... mongoose says NOTHING about deeply error-ed condition.  NOT EVEN IF YOU HAVE DEBUG TURNED ON.

Steve Lyle

未讀,
2017年4月28日 上午9:28:032017/4/28
收件者:Mongoose Node.JS ODM
I resend some of last night's bitterness.
I'm been told, but yet to see anywhere first hand, that even the authors have commented on being less than happy with there design.
That is at least some what conciliatory.

To the authors, just think of your next design choices like this:
  - by removing some unnecessary draconian rules in this world YOU ENABLE ME (US / YOUR USERS & FANS) TO BE THE MORE CREATIVE 
  - AND it costs you LESS OF YOUR EFFORT
  - AND enabling my creativity you're BUILDING A BETTER PRODUCT

Just my two bits.
Need help removing the .toLower() in your code on the collection name?
If the application is structured well this is probably in only one line of code.  So you can fix  this in no more consideration that the next maintenance release.

Thanks.



On Thursday, April 27, 2017 at 10:03:28 PM UTC-4, Steve Lyle wrote:
回覆所有人
回覆作者
轉寄
0 則新訊息