First things first. I am totally new on Symfony, and I am trying to solve an issue but I don't know how. So, if my questions seem to weird to you, then please help me by explaining where I am wrong and thank you in advance.
So, in my DB I have the following tables:
payments
, with columns: id
, merchant_sevice_id
, customer_id
, status
, type
, created_at
, amount_amount
, amount_currency
. payment_method_payment_method_type
, payment_method_payment_method_id
, vat
and failed_reason
.
and
merchant_services
with columns: id
, payment_institution_id
, account_id
, name
, capacity
, capabilities
, created_at
, mid
, status
, and blocked_bins_id
.
The two tables are connected with a manyToOne
relationship. So, many payments could belong to one Merchant
Now, the problem is when I try to get one Payment
and check the relationship with Merchants
. The fields of the Merchant
are all nulled
, while in DB I have values.
So a given record in payments
table looks like that:
| id | merchant_service_id | customer_id | status | type | created_at | amount_amount | amount_currency | payment_method_payment_method_type | payment_method_payment_method_id | vat | failed_reason |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0fede82a-b898-4287-83e3-8f7d28d576db | 548d36d9-f1e6-4854-b513-1559b2499b45 | 237369c4-feed-4e24-964a-638938c7940c | failed | SALE | 2018-06-15 07:36:28 | 100 | GBP | card | f35f78c4-2da7-432a-ace5-c0829db448af | 5 | |
And the related record in merchants is like that:
| id | payment_institution_id | account_id | name | capacity | capabilities | created_at | mid | status | blocked_bins_id |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 548d36d9-f1e6-4854-b513-1559b2499b45 | c7a02b53-6c8b-4aa9-b1af-1c5b4978d844 | 4d239c0f-1fa0-4d70-88b4-95b6f05e7bf5 | Test | 0 | ["AUTH"] | 2018-06-06 06:36:15 | 53 | active | e3d6a222-68cd-468c-a78a-b0da8ff0caf9 |
Then, the output of my query in the DB seems like that:
As you could see, the values of the merchantService
are all null (except the ID).
So the question is, what it could make this problem? Could be a serializer? Is that a kind of Symfony issue? Actually I am looking for a hint on where to look for solution of that issue.
Again sorry if my question is too weired, but I am really blocked and I don't know how to continue.