Skip to content
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

fix: option filter by optionSetid should go to database #18904

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vietnguyen
Copy link
Contributor

@vietnguyen vietnguyen commented Oct 24, 2024

/options?filter=optionSet.id:in:[%s,%s]

Before

16:01:16.521 [main] DEBUG org.hibernate.SQL - select option0_.optionvalueid as optionva1_137_, option0_.uid as uid2_137_, option0_.code as code3_137_, option0_.name as name4_137_, option0_.created as created5_137_, option0_.lastUpdated as lastupda6_137_, option0_.sort_order as sort_ord7_137_, option0_.description as descript8_137_, option0_.formName as formname9_137_, option0_.style as style10_137_, option0_.translations as transla11_137_, option0_.optionsetid as options12_137_, option0_.attributeValues as attribu13_137_ 
from optionvalue option0_ 
where 1=1 
order by option0_.name asc, option0_.uid asc limit ?

16:01:16.537 [main] DEBUG org.hibernate.SQL - select optionset0_.optionsetid as optionse1_136_0_, optionset0_.uid as uid2_136_0_, optionset0_.code as code3_136_0_, optionset0_.created as created4_136_0_, optionset0_.lastUpdated as lastupda5_136_0_, optionset0_.lastupdatedby as lastupda6_136_0_, optionset0_.name as name7_136_0_, optionset0_.description as descript8_136_0_, optionset0_.translations as translat9_136_0_, optionset0_.valueType as valuety10_136_0_, optionset0_.version as version11_136_0_, optionset0_.attributeValues as attribu12_136_0_, optionset0_.userid as userid13_136_0_, optionset0_.sharing as sharing14_136_0_ 
from optionset optionset0_ 
where optionset0_.optionsetid=?

16:01:16.543 [main] DEBUG org.hibernate.SQL - select user0_.userinfoid as userinfo1_229_0_, user0_.uid as uid2_229_0_, user0_.code as code3_229_0_, user0_.lastUpdated as lastupda4_229_0_, user0_.created as created5_229_0_, user0_.surname as surname6_229_0_, user0_.firstName as firstnam7_229_0_, user0_.email as email8_229_0_, user0_.verifiedEmail as verified9_229_0_, user0_.emailVerificationToken as emailve10_229_0_, user0_.phoneNumber as phonenu11_229_0_, user0_.jobTitle as jobtitl12_229_0_, user0_.introduction as introdu13_229_0_, user0_.gender as gender14_229_0_, user0_.birthday as birthda15_229_0_, user0_.nationality as nationa16_229_0_, user0_.employer as employe17_229_0_, user0_.education as educati18_229_0_, user0_.interests as interes19_229_0_, user0_.languages as languag20_229_0_, user0_.welcomeMessage as welcome21_229_0_, user0_.lastCheckedInterpretations as lastche22_229_0_, user0_.whatsApp as whatsap23_229_0_, user0_.skype as skype24_229_0_, user0_.facebookMessenger as faceboo25_229_0_, user0_.telegram as telegra26_229_0_, user0_.twitter as twitter27_229_0_, user0_.lastupdatedby as lastupd28_229_0_, user0_.avatar as avatar29_229_0_, user0_.dataviewmaxorgunitlevel as datavie30_229_0_, user0_.attributeValues as attribu31_229_0_, user0_.uuid as uuid32_229_0_, user0_.creatoruserid as creator33_229_0_, user0_.username as usernam34_229_0_, user0_.password as passwor35_229_0_, user0_.secret as secret36_229_0_, user0_.externalauth as externa37_229_0_, user0_.openid as openid38_229_0_, user0_.ldapid as ldapid39_229_0_, user0_.passwordLastUpdated as passwor40_229_0_, user0_.lastLogin as lastlog41_229_0_, user0_.idToken as idtoken42_229_0_, user0_.restoreToken as restore43_229_0_, user0_.restoreExpiry as restore44_229_0_, user0_.selfRegistered as selfreg45_229_0_, user0_.invitation as invitat46_229_0_, user0_.disabled as disable47_229_0_, user0_.accountExpiry as account48_229_0_ 
from userinfo user0_ 
where user0_.userinfoid=?

16:01:16.571 [main] DEBUG org.hibernate.SQL - select option0_.optionvalueid as optionva1_137_, option0_.uid as uid2_137_, option0_.code as code3_137_, option0_.name as name4_137_, option0_.created as created5_137_, option0_.lastUpdated as lastupda6_137_, option0_.sort_order as sort_ord7_137_, option0_.description as descript8_137_, option0_.formName as formname9_137_, option0_.style as style10_137_, option0_.translations as transla11_137_, option0_.optionsetid as options12_137_, option0_.attributeValues as attribu13_137_ 
from optionvalue option0_ 
where 1=1 limit ?

After

15:58:11.562 [main] DEBUG org.hibernate.SQL - select option0_.optionvalueid as optionva1_137_, option0_.uid as uid2_137_, option0_.code as code3_137_, option0_.name as name4_137_, option0_.created as created5_137_, option0_.lastUpdated as lastupda6_137_, option0_.sort_order as sort_ord7_137_, option0_.description as descript8_137_, option0_.formName as formname9_137_, option0_.style as style10_137_, option0_.translations as transla11_137_, option0_.optionsetid as options12_137_, option0_.attributeValues as attribu13_137_ 
from optionvalue option0_ inner join optionset optionset1_ on option0_.optionsetid=optionset1_.optionsetid 
where optionset1_.uid in (? , ?) 
order by option0_.name asc, option0_.uid asc limit ?

15:58:11.596 [main] DEBUG org.hibernate.SQL - select count(option0_.optionvalueid) as col_0_0_ 
from optionvalue option0_ inner join optionset optionset1_ on option0_.optionsetid=optionset1_.optionsetid 
where optionset1_.uid in (? , ?)

@vietnguyen vietnguyen force-pushed the DHIS2-17904-42 branch 4 times, most recently from c23c406 to 36b3a46 Compare October 28, 2024 19:01
Copy link

sonarcloud bot commented Oct 28, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant