This is my Card class:
class CPPSERVER_DLL_EXPORT Card
{
public:
Card() : id(0) {};
virtual ~Card() {};
int id;
CardTypePtr cardTypeX;
AdminPtr adminX;
QString no;
QString password;
bool is_used;
QDateTime create_date;
bool is_frozen;
};
This is my code:
CardPtr card(new Card());
card->id = 42;
qx::dao::fetch_by_id_with_relation("admin_id", card);
Before the fetch_by_id_with_relation function execute, The cardTypeX and adminX is null pointer like:
cardTypeX = {px=0x00000000 pn={...} }
adminX = {px=0x00000000 pn={...} }
After execution, it changed to:
cardTypeX = {px=0x02b9e878 pn={...} }
adminX = {px=0x02b828e8 pn={...} }
I think it should be:
cardTypeX = {px=0x00000000 pn={...} }
adminX = {px=0x02b828e8 pn={...} }
If it's was a bug?