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

Bug: Fail to expand attributes of a class in the query builder if it is mapped using Inline embedded property mapping #650

Closed
1 of 2 tasks
irisyngao opened this issue Nov 5, 2021 · 1 comment · Fixed by #652
Assignees
Labels
Component: Query Builder Issues related to query builder core Studio Core Team Opened by a member of the Studio core team Type: Bug
Milestone

Comments

@irisyngao
Copy link
Contributor

irisyngao commented Nov 5, 2021

Similar issues

  • I have searched and found no existing similar issues

How are you using Studio?

Legend Query

Current and expected behavior

What happened:
Fail to expand attributes of a class in the query builder if it is mapped using Inline embedded property mapping

demo.mov

Expected:
Display the attributes of the class (e.g. firm in the demo video)

Steps to reproduce

  • Copy the model below and paste it in the text mode
  • Switch to form mode and open the relationalMapping e.g. simpleRelationalMapping for the below model
  • Create a MappingTest based on 'Person'
  • Open the query builder
  • Click the Firm to display its attributes
demo.mov

Model data

###Relational
Database Oct::stores::ParentStore
(
  include Oct::stores::ChildStore

  Table FIRMTABLE
  (
    ID INTEGER,
    NAME VARCHAR(10)
  )

  Join FRIM_PERSON(FIRMTABLE.ID = PERSONTABLE.FIRMID)
  Join FRIM_CEO(FIRMTABLE.ID = PERSONTABLE.FIRMID)
)

Database Oct::stores::ChildStore
(
  Table PERSONTABLE
  (
    ID INTEGER,
    NAME VARCHAR(10),
    FIRMID INTEGER
  )
)


###Pure
Class Oct::models::Person
{
  lName: String[1];
  fName: String[1];
  firm: Oct::models::Firm[1];
}

Class Oct::models::Firm
{
  id: Integer[1];
  name: String[1];
  employees: Oct::models::Person[*];
}


###Mapping
Mapping Oct::mappings::simpleRelationalMapping
(
  *Oct::models::Firm[testInlineMapping]: Relational
  {
    ~mainTable [Oct::stores::ParentStore]FIRMTABLE
    id: [Oct::stores::ParentStore]FIRMTABLE.ID,
    name: [Oct::stores::ParentStore]FIRMTABLE.NAME
  }
  *Oct::models::Person: Relational
  {
    ~mainTable [Oct::stores::ParentStore]PERSONTABLE
    fName: [Oct::stores::ChildStore]PERSONTABLE.NAME,
    firm() Inline[testInlineMapping]
  }
)

Environment

System:
    OS: macOS 12.0.1
  Binaries:
    Node: 16.10.0 - /private/var/folders/7l/8nlbhlj55c9_lp8c23_61n8h0000gn/T/xfs-ac754eb3/node
    Yarn: 3.0.1 - /private/var/folders/7l/8nlbhlj55c9_lp8c23_61n8h0000gn/T/xfs-ac754eb3/yarn
    npm: 7.24.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 95.0.4638.69

Possible solution and workaround

No response

Contribution

  • I would like to work on the fix for this issue
@irisyngao irisyngao added this to the 2.0.0 milestone Nov 5, 2021
@github-actions github-actions bot added the Studio Core Team Opened by a member of the Studio core team label Nov 5, 2021
@MauricioUyaguari MauricioUyaguari added the Application: Query Issues related to Legend Query application label Nov 5, 2021
@akphi akphi added Component: Query Builder Issues related to query builder core and removed Application: Query Issues related to Legend Query application labels Nov 5, 2021
@akphi
Copy link
Contributor

akphi commented Nov 5, 2021

Thanks for filing the issue! This has more to do with the generic Query Builder instead of Legend Query app so I'll relabel them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Builder Issues related to query builder core Studio Core Team Opened by a member of the Studio core team Type: Bug
Projects
None yet
3 participants