node.js - What type of GUID on Mongoose -


Currently, I used MongoVUE to import from existing SQL Server database but uniqueidentifier

Enter the image details here

My question is how is the schema for this structure on Mongoose? I can not see the Gang / UUID datatype on the Mongoose docs

For more , H I get some validation IDs like verification

  db.Validations.find ({ValidationID: '1389AB5E-56BD-46FD-9A8A-258C7BDE4251'});  

This does not give any returns, although this guide is similar to the SQL Server record.

Thanks.

MangoView is obscuring things Bit is here, but it makes it easy to read well. Here's your example Validation ID of '1389AB5E-56BD-46FD-9A8A-258C7BDE4251' Looks like in the Stave - it's Type 3inindia :

  {"Validation ID": BinData (3, "E4mrXla9Rv2aiiWMe95CUQ ==")}  

The viewer is converting you into a more readable format. It is doing this by converting it to hex and adding dashes. For proof:

  & gt; Var Bar = Binadata (3, "E4 MRXLA 9 RV2BAIMMMMTCUUK ==") & gt; If you want to find that ID, then strip the dash and pass it in that search (as I put a sample document):   

pre> < Code> & gt; Db.foo.find ({ValidationID: UUID ('1389AB5E56BD46FD9A8A258C7BDE4251')}} {"_id": ObjectID ("544fd7ddbb4f50c77c61f367"), "Validation ID": BinData (3, "E4 MRXLA 9 RV2 VAMMMRCUU ==")} < / Code>

I have no set mongoose installed to test, but in the case of being converted to javascript , the foot has worked.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -