For example, I have a cars table, each has a model and a make . A car can have only one, and there is a table of models and makes , while their identifiers are automatically generated. Can I reference them in my cars table? What does JSON look like?
I tried to create a new field in the cars table and specify id in the Via textbox, but it just creates a new column in the corresponding id1 table. Is there a proper way?
Here is my sample JSON schema:
{ "name": "cars", "fields": { "model": { "object": "models" }, "make": { "object": "makes" } } }, { "name": "models", "fields": { "title": { "type": "string" }, "make": { "object": "makes" }, "id": { "collection": "cars", "via": "model" } } }, { "name": "makes", "fields": { "models": { "collection": "models", "via": "make" }, "title": { "type": "string" }, "id": { "collection": "cars", "via": "make" } } }
source share