I have a question that I could not find in my research on the Internet. I am working on a web application in Node.js and Cassandra. I am currently working on a notification system, and I need to compare two uuids so that I do not send a notification to those people who take the original action (which causes the notification).
The problem is that when comparing two uuids that should be equal, I always get a false value.
Here is an example of the code I'm currently working on:
console.log('user_id :', user_id.user_id); console.log("user id of the current user :", this.user_id); console.log(user_id.user_id == this.user_id); console.log(user_id.user_id === this.user_id);
And here is the result display:
user_id : Uuid: 29f1227d-58dd-4ddb-b0fa-19b7fc02fbe8 user id of the current user : Uuid: 29f1227d-58dd-4ddb-b0fa-19b7fc02fbe8 false false user_id : Uuid: c8f9c196-2d63-4cf0-b388-f11bfb1a476b user id of the current user : Uuid: 29f1227d-58dd-4ddb-b0fa-19b7fc02fbe8 false false
As you can see, the first uuids should be the same. They are generated using the uuid library inside the nodejs cassandra driver. I do not understand why I can not compare them when I can make any query in my Cassandra database with the specified uuid.
If someone can help me, it will be very nice!
source share