Closed OpossumPetya closed 4 years ago
Ah, hah! I knew I forgot something: The foreign key field assumes x-list-columns is only strings... That's a bug that'll have to get fixed.
Until that's fixed, there are a couple things that you can do to work around this:
x-display-field
(described here under the x-foreign-key
section of the Extended Field Configuration) to the field you want to use to both search and display.x-list-columns
, set a field title
inside the post_type_id
field definition (unless that's just an example for the sake of this bug report).oh, thanks so much! -- both of these work for me. I got derailed by this anomaly from looking for more obvious ways, I guess :)
Standalone Yancy. Simple DB -- two tables: post_types (id, post_type) and posts (id, post_type_id, title, text). In
yancy.conf
I describeposts
's post_type_id using x-foreign-key, so I can easily find and select needed value in UI:If I describe post_types as
it works great. But when I use following
the drop down with values is displayed with empty rows -- the number of rows is correct, and selecting a row get the correct value (id from post_type), but those dropdown rows do not show actual corresponding values.
test.zip