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

When an array of objects is instanciated within a new object just declared #44

Closed
BrunoEVCosta opened this issue Jun 28, 2019 · 0 comments
Assignees

Comments

@BrunoEVCosta
Copy link
Member

object1:{
    _table:"tbl1",
    object2:[{
        _table:"tlb2",
        _model:{
            attr1:"",
            attr2:"" 
        }
     }]
}

This generates:

object1:{
   object2:[{
        _table:"tlb2",
        _model:{
            attr1:"",
            attr2:"" 
        }
   }]
}

Fills attributes but doesn't remove support structure.

Quick fix:

object1:{
    _table:"tbl1",
    tbl1attr:"attr",
    object2:[{
        _table:"tlb2",
        _model:{
            attr1:"",
            attr2:"" 
        }
     }]
}

This generates:

object1:{
   tabl1attr:"attr"
   object2:[{
        attr1:"",
        attr2:"" 
   }]
}

But this requires an attribute to be needed. Which generally is since there is no need to build a nested depth with no outer values.
Still this is a bug that should be addressed.

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

No branches or pull requests

1 participant