Hi all,
while moving on with QxOrm i've found it really powerfull but now i'm unsure about a behaviour of the library because even if it is desirable probably most of the time, it's creating a lot of troubles in my design.
Is possible to fetch an object multiple times obtaining the same underlaying instance?
In my case i need to fetch a series of objects which become unique at runtime because they are providing access to runtime objects that are not stored in the DB. This is fine.
Later i need to fetch a new series of objects with a 2 levels of relationships, which are in the last one pointing to the first table used before.
My app crashes since now i would expect to have a QSharedPointer<FirstObject> different from the one in the 1st level relationship, but both should point to the same real object; that's not true since now i have two different C++ Objects with same ID. The one obtained later is just a copy of what in the DB, obviously.
Can QxOrm keep track of already fetched objects in order to provide a copy of the shared pointer instead of a new object, at least when the object is just referred as a relationship?
My design relies on the idea of references that are used at runtime, if i fetch an object that's just a multiple format container to access the final object i need the object i'm already working with, otherwise having relationships is just making things harder