Manually set session to entity

Is it possible to set the org.eclipse.persistence.sessions.Session manually in an entity?

Context: I found another way to get the dreaded unfetched attribute error and I want to fix it by opening a session and providing it to the processed entities, so the attributes can be properly lazy loaded.

Can you give us a scenario to reproduce the error?

No luck until now in reproducing it in a stand-alone example. I’m still trying to figure out what the difference to the original project is.

I probably fixed it by reloading the entity w/o a fetch plan…