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

herbs update - Entities with fields with another entity as type #64

Closed
dalssoft opened this issue Oct 11, 2021 · 10 comments · Fixed by #136
Closed

herbs update - Entities with fields with another entity as type #64

dalssoft opened this issue Oct 11, 2021 · 10 comments · Fixed by #136
Assignees
Labels
bug Something isn't working released severity-major Item is very important

Comments

@dalssoft
Copy link
Member

ex:

    entity('ToDoList', {
        id: field(Number),
        items: field([Item]),

error:

TypeError: Type is not a constructor
    at type2Str (C:\Users\David\AppData\Roaming\npm\node_modules\@herbsjs\herbs-cli\src\generators\new\infra\database\migrations\migrations.js:5:17)
    at C:\Users\David\AppData\Roaming\npm\node_modules\@herbsjs\herbs-cli\src\generators\new\infra\database\migrations\migrations.js:28:33  
    at Array.forEach (<anonymous>)
    at Object.migrations (C:\Users\David\AppData\Roaming\npm\node_modules\@herbsjs\herbs-cli\src\generators\new\infra\database\migrations\migrations.js:25:29)
    at Command.run (C:\Users\David\AppData\Roaming\npm\node_modules\@herbsjs\herbs-cli\src\commands\update.js:9:75)
@dalssoft dalssoft added the bug Something isn't working label Oct 11, 2021
@italojs
Copy link
Member

italojs commented Oct 12, 2021

@dalssoft can you prove more detail of how can I reproduce it?

@dalssoft
Copy link
Member Author

dalssoft commented Oct 12, 2021

const A = entity('A', { id: field(Number), })

const B = entity('B', {
        id: field(Number),
        field1: field([A]),
})

> herbs update

@jhomarolo jhomarolo added ready-to-work Item is ready to work on it severity-major Item is very important and removed ready2implement labels Dec 22, 2021
@PedroHaupenthal
Copy link
Contributor

@jhomarolo could you add the wip tag please?

@jhomarolo jhomarolo added the wip work in progress label Jan 15, 2022
@vma-vortx
Copy link

@PedroHaupenthal have you worked on this issue? The wip is still valid?

@dalssoft
Copy link
Member Author

After so many updates on herbscli, is it still a valid issue? Can someone check?

@dalssoft
Copy link
Member Author

I can confirm that the error is still happening

@jhomarolo
Copy link
Contributor

@PedroHaupenthal have you worked on this issue?

@jhomarolo jhomarolo moved this from Check if it is still valid to Ready to code in Herbs - 3rd Anniversary Edition Jun 17, 2022
endersoncosta added a commit to endersoncosta/herbs-cli that referenced this issue Jun 25, 2022
Repository owner moved this from Ready to code to Done in Herbs - 3rd Anniversary Edition Jun 25, 2022
github-actions bot pushed a commit that referenced this issue Jun 25, 2022
## [2.7.5](v2.7.4...v2.7.5) (2022-06-25)

### Bug Fixes

* fix a bug when the entity has another entity as field ([0690899](0690899)), closes [#64](#64)
@herbsjs-robot
Copy link

🎉 This issue has been resolved in version 2.7.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dalssoft
Copy link
Member Author

dalssoft commented Jul 5, 2022

Related / evolution: #145

@endersoncosta
Copy link
Contributor

I take this issue

@jhomarolo jhomarolo removed wip work in progress ready-to-work Item is ready to work on it labels Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released severity-major Item is very important
Projects
Development

Successfully merging a pull request may close this issue.

7 participants