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

editionView won't work with reference_many #1351

Open
toblie opened this issue Jun 29, 2017 · 4 comments
Open

editionView won't work with reference_many #1351

toblie opened this issue Jun 29, 2017 · 4 comments

Comments

@toblie
Copy link

toblie commented Jun 29, 2017

I created a model with some reference_many fields.
Here a sample of it:

nga.field('topics', 'reference_many')
        .targetEntity(topic)
        .targetField(nga.field('name'))
        .label('Themen')

On creationView all is working fine but in editionView it only shows the items with "remove icon" but without labels.
bildschirmfoto 2017-06-29 um 14 07 34

And additional I got some errors on console... I dont know these requests and what they are for. Maybe the issue caused because of these errors.
bildschirmfoto 2017-06-29 um 14 05 15

It would be nice to get a solution or at least a little hint to solve this.
Thanks

@Kmaschta
Copy link
Contributor

Hello,

Can you provide a Plunkr in order to help us ?

Thanks

@toblie
Copy link
Author

toblie commented Jun 29, 2017

Thanks for your reply... but I think I can't because it is using my local REST API.
so... you see the result above and my declaration of fields... maybe yo can identify any issue or missing declaration?

Thanks

@toblie
Copy link
Author

toblie commented Jun 30, 2017

Is there anyone who can help and maybe show me a sample of working reference_many editionView ?
Thanks

@danielesergio
Copy link

I had the same problem, in my case the problem depended on type mismatch. The entity id was a numeric type but I tried to link this entity with a list of String instead of a list of number.
This is a example:
user:
[
{
id: '1',
profil_pic:"http://www.free-icons-download.net/images/user-icon-44709.png",
name: 'John',
email: 'toto@admin',
permissions: ["1","2","3"], // here the ids are string!!!
}
]

permissions:
{
id: 1, //here the id is a number!!!
name: 'ADMIN',
gid: 1000
}

I don't know why it work on listView and showView but it doesn't work on editView.

Plunker link:
https://next.plnkr.co/edit/POXOeJlnSxm9FRJq

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

No branches or pull requests

3 participants