How to get read-only objects from database?
You must load the parent object again.
I'd like to query the database and get read-only objects with session object. I need to save the objects in my server and use them through the user session. If I use a object outside of the function that calls the database, I get this error:
"DetachedInstanceError: Parent instance is not bound to a Session; lazy load operation of attribute 'items' cannot proceed"
I don't need to make any change in those objects, so I don't need to load them again.
Is there any way that I can get that?
Thanks in advance!