Skip to content

DEFINE-ing an Array of Objects #1443

Closed Answered by marcbinz
KeatonTech asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @KeatonTech 👋

I had the same issue when it comes to defining array fields. I could not find any reference in the docs or anywhere else on the internet, only your discussion here. So in the end I basically "solved" (if it is the correct way) it by trial and error. Here is what I figured out so far:

All approaches like array(string) (similar to how record links are defined), array<string> and similar ways do not work. What I did in the end was to first define a field just as array and then define all its values via my_field.* notation. Example (based on yours):

DEFINE TABLE MyTable SCHEMAFULL;
DEFINE FIELD thing ON MyTable TYPE array;
DEFINE FIELD thing.* ON MyTable TYPE string;

This r…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@player8472
Comment options

Answer selected by tobiemh
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants