Answer the question
In order to leave comments, you need to log in
Is it a bad idea to store oneToMany relationships in a json column?
The table has a large number of relationships with other tables, say, 6 oneToMany relationships, which, with each request to the backend, need to be parsed in the form:
name: "Name",
surname: "Surname",
relation1: [{id: 1}],
relation1: [{id: 2}],
relation1: [{id: 3}],
relation1: [{id: 4}],
relation1: [{id: 5}],
relation1: [{id: 6}],
Answer the question
In order to leave comments, you need to log in
What kind of database do you have? If this is a relational database, then in this way you destroy its concept) With this approach, you deprive yourself (and the database) of at least an automatic check for the existence of a record in the table you refer to (Foreign Key Constraint)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question