Replies: 2 comments
-
Very disappointing |
Beta Was this translation helpful? Give feedback.
0 replies
-
Don't add your post in the blog. I would make 2 tables;
so you can create a blog1:
// example id: blogs:cb3h8k9rfpblrl71el7r then create the posts:
than you can query for the blogs or the posts
or
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can you please provide a comprehensive example of some simple data model, like
multiple blogs
where each blog has an owner
where blogs have posts
and a post has an author
and a post has comments
and a post belongs to or references a blog
and comments have an author
and comments have reactions
and a comment belongs to or references a post
How do you define O2M, M2O, M2M, O2O relationships?
Also in surrealist.
Either I'm really stupid or you're very smart that you have no issues with modelling your models and relatioships and no one has ever asked anything like that.
I just tried to create a posts field on blog, with surrealist.
I gave it the array<record> type.
Which surrealist turned into,
posts being an array<record>
but also creating
posts[*] being type record
And when I now try to INSERT a blog row I get
Or when I have a post, I'd like to give it the reference to a single blog's id.
Usually I have something like
If you know what I mean, a reference to the blog using the blog row's id.
Beta Was this translation helpful? Give feedback.
All reactions