Virtual Columns is mapped wrongly.
vitaliiShveider opened this issue · 0 comments
vitaliiShveider commented
For example:
We have entity_state and entity_order
one state with id 1
and 3 orders with this state.
orders with ids 1, 2, 3
Pseudo code:
StateQuery::create()
->useOrderQuery()
->filterByIdOrder_In($salesOrderItemIds)
->endUse()
->addAsColumn(
'idOrder',
OrderTableMap::COL_ID_SALES_ORDER,
)->find();
we expect to have 3 items with virtual column idOrder
FE:
{
"state_id": 1,
"virtual_columns": {
"idOrder": 1
}
},
{
"state_id": 1,
"virtual_columns": {
"idOrder": 2
}
},
{
"state_id": 1,
"virtual_columns": {
"idOrder": 3
}
}
But propel map it next way:
{
"state_id": 1,
"virtual_columns": {
"idOrder": 3
}
},
{
"state_id": 1,
"virtual_columns": {
"idOrder": 3
}
},
{
"state_id": 1,
"virtual_columns": {
"idOrder": 3
}
}
Looks like virtualColumns is mapped by primary key