mysql left join-like feature
in my case i have a user table, which regroups data like :birthdate, name, firstname, email address,...., and i have an address table which store, address line1, 2, zip code, city, [state], and userID(which obviously links back to the user from the user table whom uses this address).
I would basically like to know if it is possible to get if i could have a collection where all data from a user can be displayed(where all the table i want are displayed for this specific user:
name_userA,firstname_userA, birthdate_userA,...,
<- user table| address table ->addressLine_userA, city_userA, ...)
Having all information on a user based on id(which is linked to other table(s) as a pointer) displayed on a dedicated collection
Yes, this is possible in the API now... you would create a relationship between the collections. Probably a O2M or M2M in this case:
https://docs.directus.io/guides/relationships.html#many-to-one
Also, this would be a nice thing to have in the App too. Right now this data would be displayed as links to the other relational data/items... but having that relational form inline would be nice too. If @rijkvanzanten likes this idea, I'll open a Feature Request on the App.
@benhaynes A o2m / m2m that renders the related items inline is the relational repeater 馃槈
True!! Might be nice for it to render inline a bit more "seamlessly" when used on a O2M since there will be no repeating. 馃憤
I think you're confusing your O2Ms with the M2Os @benhaynes. An O2M _does_ repeat, as does a M2M.
I use them interchangeably, since it just depends on the direction of the relationship. Yes, the repeater would work well for O2M and M2M... but I guess I was talking about a M2O on my original idea. That would allow you to manage relational data on the parent item _directly_. Same concept... just different parent/direction.