-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using fields from related table in filter #4
Comments
An addition. How can I sort by related table field? Like: Thanks. |
hi mike. |
Hi Christian. Thanks for your reply. I've already solved my issue in current project that focused at using flat-file database. Unfortunately I am not familiar with all SQL engines that Cortex supports. But I think they all should support joins and ordering by reference fields. So creating SQL query based on even complex conditions like I guess all conditions atoms that contains reference fields should be replaced with references ids checks like I am not sure about ordering, but it can be done by adding temporary column to main table based on used reference fields like your virtual fields. I am sorry... I am not so familiar with F3 and Cortex - just several days - So I can't be wise adviser. P.S. Thanks for you work. This framework is quite reliable for small stand-alone apps. P.P.S. Btw I made interface of F3+Cortex and https://www.datatables.net in server-side mode - Works cool. The only thing is ordering and filtering by reference fields. That is why I issued current subject. May be when we solve this subject task I will wrap interface in plug-in for F3 and post it on Git. |
Hi Mike. I thought about that some time. I think it would be possible to add your feature request. With some query parsing and magic functions that hooks some joins and/or reference checks with |
Thanks for considering this request :) |
Greetings.
Is there a possibility to make search by certain fields in table and related table to find any row that contains search word in any of fields?
Cortex contains "has" function that allows to narrow query, but this doesn't fit my needs. It gives me something like:
name like ? AND product.title like ?
.I need something like:
name like ? OR product.title like ?
, where isproduct
isbelongs-to-one
relation.I see the only way to load IDs of products that filtered by
title like ?
. And then usename like ? OR product IN ?
. This is probably good for JIG, but not good for SQL.I would appreciate for any suggestions. Thanks.
Mike.
P.S. It would be awesome to have possibility to use related table fields directly in filter.
The text was updated successfully, but these errors were encountered: