redis-om-node icon indicating copy to clipboard operation
redis-om-node copied to clipboard

Add JSON as a new type, for creating nested JSON objects

Open aryaman-titan opened this issue 3 years ago • 3 comments

@guyroyse Amazing work! Thanks a lot for this library. I was wondering if it would be possible to store nested JSON objects in the schema? Or better a customer interface/entity that's user defined. Here's one such example

const personSchema = new Schema(Person, {
  firstName: { type: 'string' },
  lastName: { type: 'string' },
  friends: { type: Person[] }
})

Let me know if there's any workaround for storing non-primitive types (like JSON) in the friends field.

aryaman-titan avatar Jul 15 '22 15:07 aryaman-titan

There is a PR for this feaature: https://github.com/redis/redis-om-node/pull/73

xieyuheng avatar Jul 26 '22 15:07 xieyuheng

That's awesome! It would be a major feature upgrade. Waiting to try it soon

aryaman-titan avatar Jul 27 '22 12:07 aryaman-titan

Is there any documentation available for using it, as this PR is merged already to the main?

aryaman-titan avatar Jul 27 '22 12:07 aryaman-titan

This is still being developed and has been asked for dozens of times. I'm closing this as a duplicate.

guyroyse avatar Aug 29 '22 15:08 guyroyse