We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm looking for a way to query a table where the length of the children (has_many relation) is greater than 0.
I'm currently doing it like this:
const disciplines = useLstObservable({ table: 'param_discipline', }); const [filteredDisciplines, setFilteredDiscipline] = useState([]); useEffect(() => { const getFilteredDisciplines = async () => { const filteredDisciplines = []; for (const discipline of disciplines) { const count = await discipline.epreuves.count; if (!!count) { filteredDisciplines(discipline); } } return filteredDisciplines; }; getFilteredDisciplines().then(setFilteredDiscipline); }, [disciplines]);
Is there a better way ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I'm looking for a way to query a table where the length of the children (has_many relation) is greater than 0.
I'm currently doing it like this:
Is there a better way ?
The text was updated successfully, but these errors were encountered: