Closed thisiseddy-ab closed 1 year ago
Redis OM for node doesn't store the entity ID in the JSON document. You can easily add it as a field if you like. Do note that redis-om@beta, if that's the version you are using, will allow you to specify the entity ID when you save an entity. You'll still need to make it a field and populate it.
Redis OM for node doesn't store the entity ID in the JSON document. You can easily add it as a field if you like. Do note that redis-om@beta, if that's the version you are using, will allow you to specify the entity ID when you save an entity. You'll still need to make it a field and populate it.
For Now I Solved Like This
const My_Id = ulid()
const Service = new Pupptter_Service(Pupptter_Service_Schema, My_Id,
{
My_Id: My_Id,
Scheme: "http",
Host : "loclahost",
Port : PORT,
Status : "UP",
created_at : moment.utc().toISOString({keepOffset:true}),
unix_created_at : moment.utc().unix(),
})
const Service_Id = await Pupptter_Service_Repository.save(Service)
Im going to use redis-om@beta when it becomes Standart because i cant find the documentation for it
I'm Trying to use Redis OM For Node and Python,the problem the JSON data that python generates has a field for pk(Primary Key,Entity Id ) but node JSON does not.
I can Set e specific Primary Key in Python like this
is there any solution how to set a primary key in node or just copy Entity Id as a Field Schema