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: Failed to open class properties in explorer of a operational set implementation #647

Closed
2 tasks done
MauricioUyaguari opened this issue Nov 4, 2021 · 0 comments · Fixed by #646
Closed
2 tasks done
Assignees
Labels
Extensions: DSL Mapping Studio Core Team Opened by a member of the Studio core team Type: Bug
Milestone

Comments

@MauricioUyaguari
Copy link
Member

Similar issues

  • I have searched and found no existing similar issues

How are you using Studio?

Legend Query

Current and expected behavior

In the class explorer of query builder, the properties coming from a root operational set implementation do not expand.
All properties under operation set implementation are expected to show as mapped and expand.

Steps to reproduce

  • Copy model data into text mode and navigate to class model::Person
  • Right click on execute to open query builder
  • On the model::Person explorer try and expand property firm. The property will not expand as expected

Model data

###Relational
Database store::MyDatabase
(
  Schema MySchema
  (
    Table PersonTable1
    (
      Brand VARCHAR(128) NOT NULL,
      NAME VARCHAR(128),
      LASTNAME VARCHAR(128),
      Nick_Name VARCHAR(128) NOT NULL,
      Hq1_State VARCHAR(128),
      Hq1_Street VARCHAR(128),
      Hq2_State VARCHAR(128),
      Hq2_Street VARCHAR(128),
      Value DOUBLE,
      Locations INTEGER,
      Found_Date DATE PRIMARY KEY,
      ID VARCHAR(128) PRIMARY KEY
    )
    Table PersonTable2
    (
      Brand VARCHAR(128) NOT NULL,
      NAME VARCHAR(128),
      LASTNAME VARCHAR(128),
      Nick_Name VARCHAR(128) NOT NULL,
      Hq1_State VARCHAR(128),
      Hq1_Street VARCHAR(128),
      Hq2_State VARCHAR(128),
      Hq2_Street VARCHAR(128),
      Value DOUBLE,
      Locations INTEGER,
      Found_Date DATE PRIMARY KEY,
      ID VARCHAR(128) PRIMARY KEY
    )
  )
)


###Pure
Class model::Firm
{
  hq1: model::HQ[0..1];
  hq2: model::HQ[0..1];
  brand: String[1];
  value: Float[1];
  date: Date[1];
  locations: Integer[1];
}

Class model::HQ
{
  state: String[1];
  street: String[1];
}

Class model::Person
{
  name: String[1];
  lastName: String[1];
  nickName: String[1];
  firm: model::Firm[*];
}


###Mapping
Mapping mapping::MyMapping
(
  *model::Person: Operation
  {
    meta::pure::router::operations::union_OperationSetImplementation_1__SetImplementation_MANY_(person1,person2)
  }
  model::Person[person1]: Relational
  {
    ~primaryKey
    (
      [store::MyDatabase]MySchema.PersonTable1.Found_Date,
      [store::MyDatabase]MySchema.PersonTable1.ID
    )
    ~mainTable [store::MyDatabase]MySchema.PersonTable1
    name: [store::MyDatabase]MySchema.PersonTable1.NAME,
    lastName: [store::MyDatabase]MySchema.PersonTable1.LASTNAME,
    nickName: [store::MyDatabase]MySchema.PersonTable1.Nick_Name,
    firm
    (
      hq1
      (
        state: [store::MyDatabase]MySchema.PersonTable1.Hq1_State,
        street: [store::MyDatabase]MySchema.PersonTable1.Hq1_Street
      ),
      hq2
      (
        state: [store::MyDatabase]MySchema.PersonTable1.Hq2_State,
        street: [store::MyDatabase]MySchema.PersonTable1.Hq2_Street
      ),
      brand: [store::MyDatabase]MySchema.PersonTable1.Brand,
      locations: [store::MyDatabase]MySchema.PersonTable1.Locations,
      value: [store::MyDatabase]MySchema.PersonTable1.Value,
      date: [store::MyDatabase]MySchema.PersonTable1.Found_Date
    )
  }
  model::Person[person2]: Relational
  {
    ~primaryKey
    (
      [store::MyDatabase]MySchema.PersonTable2.Found_Date,
      [store::MyDatabase]MySchema.PersonTable2.ID
    )
    ~mainTable [store::MyDatabase]MySchema.PersonTable2
    name: [store::MyDatabase]MySchema.PersonTable2.NAME,
    lastName: [store::MyDatabase]MySchema.PersonTable2.LASTNAME,
    nickName: [store::MyDatabase]MySchema.PersonTable2.Nick_Name,
    firm
    (
      hq1
      (
        state: [store::MyDatabase]MySchema.PersonTable2.Hq1_State,
        street: [store::MyDatabase]MySchema.PersonTable2.Hq1_Street
      ),
      hq2
      (
        state: [store::MyDatabase]MySchema.PersonTable2.Hq2_State,
        street: [store::MyDatabase]MySchema.PersonTable2.Hq2_Street
      ),
      brand: [store::MyDatabase]MySchema.PersonTable2.Brand,
      locations: [store::MyDatabase]MySchema.PersonTable2.Locations,
      value: [store::MyDatabase]MySchema.PersonTable2.Value,
      date: [store::MyDatabase]MySchema.PersonTable2.Found_Date
    )
  }
)

Environment

OS: Windows

Possible solution and workaround

No response

Contribution

  • I would like to work on the fix for this issue
@MauricioUyaguari MauricioUyaguari added Type: Bug Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Nov 4, 2021
@MauricioUyaguari MauricioUyaguari added this to the 2.0.0 milestone Nov 4, 2021
@MauricioUyaguari MauricioUyaguari self-assigned this Nov 4, 2021
@github-actions github-actions bot added the Studio Core Team Opened by a member of the Studio core team label Nov 4, 2021
@akphi akphi removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extensions: DSL Mapping Studio Core Team Opened by a member of the Studio core team Type: Bug
Projects
None yet
2 participants