Cortext JSON Key value realtion to other table id.

27 views
Skip to first unread message

Jeffrey Röling

unread,
Nov 1, 2022, 2:53:41 PM11/1/22
to Fat-Free Framework
i have got 2 tables where is want to make a relationin between

Table 1 is "Items categories" in there are colums with "id"  and "name"
Table 2 is "Reservations" in there is an "colum"  with items as a json format  there KEY is items-categories ID and value is the amount of one category.

How can i setup an relation between so i can get the category name instead of the id?

ikkez

unread,
Nov 3, 2022, 10:20:02 AM11/3/22
to Fat-Free Framework
I don't think it can handle it with JSON inspection directly. If you'd normalize your table schema, it'll probably be easier.

Jeffrey Röling

unread,
Nov 3, 2022, 12:10:26 PM11/3/22
to Fat-Free Framework
What do you mean with normalize table schema like for each item an colum?
Is there another solution which I can use? to have the ability to make it dynamic so when i add an category it's also added to the items array in reservations.
Reply all
Reply to author
Forward
0 new messages