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

Failed to initialize many to many #32

Closed
StefanoLambiase opened this issue Dec 30, 2020 · 1 comment
Closed

Failed to initialize many to many #32

StefanoLambiase opened this issue Dec 30, 2020 · 1 comment

Comments

@StefanoLambiase
Copy link
Owner

L'inizializzazione di un oggetto di tipo Lettore non inserisce nell'oggetto le variabili annotate come manyToMany. Questo rende impossibile andare a stampare i valori dei generi conosciuti da un lettore perché non presenti.

Di seguito l'errore dato: "failed to lazily initialize a collection of role"

@AlessioCasolaro
Copy link
Collaborator

Aggiungere accanto alle annotazioni ManyToMany oppure OneToMany la seguente annotazione: (fetch = FetchType.EAGER)

https://stackoverflow.com/questions/22821695/how-to-fix-hibernate-lazyinitializationexception-failed-to-lazily-initialize-a

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

2 participants