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

View layout not show attribute in the view #771

Closed
Titoleto opened this issue Aug 22, 2022 · 9 comments
Closed

View layout not show attribute in the view #771

Titoleto opened this issue Aug 22, 2022 · 9 comments
Labels

Comments

@Titoleto
Copy link

Titoleto commented Aug 22, 2022

When I add an attribute in the fetch, the option to show attribute in the view is unchecked by default sometimes, but if I select to display it in the view, I don't know why, when executing the query, it is unchecked and the attribute is not shown. It also happens when I add a relation and try to include some attribute of the relation, it does not show me the attribute

@rappen
Copy link
Owner

rappen commented Aug 22, 2022

Aahh... I've tried to fix this for a while.
Yes, I know it's there. But I don't really see the pattern.
Please add more info, if you find any! 🙏

@rappen rappen added the bug label Aug 22, 2022
@jdpottle
Copy link

jdpottle commented Oct 7, 2022

I have several examples of when this issue is occurring, one is an aggregate query and one is not, both have link-entity. In both cases, there are attributes missing from the results.
<fetch aggregate="true"> <entity name="esdc_role"> <attribute name="esdc_name" alias="Role" groupby="true" /> <link-entity name="esdc_roletracking" from="esdc_role" to="esdc_roleid"> <attribute name="esdc_headcount" alias="Headcount" aggregate="count" /> <filter> <condition attribute="esdc_headcount" operator="eq" value="1" /> </filter> </link-entity> </entity> </fetch>
Results
Only the "esdc_name" (alias Role) column appears.

Example 2:
<fetch> <entity name="role"> <attribute name="name" /> <link-entity name="systemuserroles" from="roleid" to="roleid" intersect="true"> <attribute name="systemuserid" /> <link-entity name="systemuser" from="systemuserid" to="systemuserid" intersect="true"> <attribute name="domainname" /> <attribute name="fullname" /> </link-entity> </link-entity> </entity> </fetch>
Results:
Only 'name' column appears

In both cases, I was able to run these queries as SQL and received the correct results

@rappen
Copy link
Owner

rappen commented Oct 8, 2022

It's not clear at all, I shall improve it, but can you please add an Alias to each link-entity?
When using the Layouts, it is needed to be able to show these related attributes.

@jdpottle
Copy link

jdpottle commented Oct 8, 2022 via email

@BennyCodeCodeMan
Copy link

Adding the alias to the link entity worked for me. thanks!

@jdpottle
Copy link

jdpottle commented Oct 12, 2022 via email

@rappen
Copy link
Owner

rappen commented Oct 29, 2022

Related issues: #775, #803, #804, #819

@rappen
Copy link
Owner

rappen commented Nov 17, 2022

Added these warnings:

image

@rappen
Copy link
Owner

rappen commented Nov 17, 2022

Closing this now - please reopen if there is more to fix! Or create a new issue.

@rappen rappen closed this as completed Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants