kitchen-cli icon indicating copy to clipboard operation
kitchen-cli copied to clipboard

When having a select inside a CRUD_field it only fetches select items if there's another select with the same query in the main form (not inside the CRUD_field).

Open kingmatusevich opened this issue 9 years ago • 5 comments

Without a pointless Select in the main form with the same query: (a) the main form screen shot 2016-01-12 at 02 40 28 (b) the CRUD with a select that doesn't show options. screen shot 2016-01-12 at 02 40 36

With a pointless Select in the main form with the same query: (a) the main form screen shot 2016-01-12 at 02 42 35 (b) the CRUD with a select that now actually shows options. screen shot 2016-01-12 at 02 42 41

Also, I'm pretty sure the joins don't work in a CRUD_field, even with the useless select. Thank you for your great work! 😊

kingmatusevich avatar Jan 12 '16 05:01 kingmatusevich

screen shot 2016-01-12 at 02 50 41 Here you can see what I meant when I said the joins don't work.

kingmatusevich avatar Jan 12 '16 05:01 kingmatusevich

@kingmatusevich

OK, this is two issues:

First one is because "kitchen" didn't automatically created subscription for "product" required by CRUD's insert form. Workaround is to refer that query in your page (page that contains CRUD) in related_queries. For example:

  "related_queries": [
    { "name": "product_query_name", "params": [ ] }
  ]

Second issue: CRUD currently cannot do what you are trying to implement - it's purpose is to enter simple data (not data from another collection) into array. However, it will be great to have this feature and I'll try to implement it.

perak avatar Jan 22 '16 13:01 perak

Great, glad to hear you are on top of it, I obviously think this is an awesome feature to have as well. Let me know if I can help you somehow. Good work :+1:

kingmatusevich avatar Jan 23 '16 17:01 kingmatusevich

I can confirm the workaround you posted (related_queries) does fix my issue with the subscription.

kingmatusevich avatar Jan 24 '16 03:01 kingmatusevich

Of course, the CRUD doesn't traverse the Join I defined with the productId and the rest of the product fields.

kingmatusevich avatar Jan 24 '16 03:01 kingmatusevich