These are chat archives for Automattic/mongoose

22nd
Sep 2016
Tobias Lundgren
@lundgren2
Sep 22 2016 21:16
Hello! I have a problem with findOne() when it is stored as a Number in the database. I can use findOne ({ name: ”Name Name”}) but not findOne({ number: 123 or ”123” })… Does anyone know how to fix this?
Tobias Lundgren
@lundgren2
Sep 22 2016 21:44
if I use findOne with mongoose i will get that output:
{ _id: 57e42e8e37aeefad08bfcab7,
Company: ’xxx',
CardCode: 30002, <— don’t work
CardName: ’xxx’, <— works
Street1: 'Sxx 5B',
Street2: '',
City: 'Stockholm',
Contact: 'Anxx',
EMail: '',
SalesPerson: ’xxx',
Turnover: 0 }