hasone relations and belong to
I am trying to use 2 relations in a resource, the model is "employee", through this I am making the first relation
to get to the "EmployeeAddress" table, the relationship is hasOne, data: 'employee_id','address_id', 'start_date', 'end_date', the second is to get
to the "Address" table, the relationship is belongs to, data: 'street_1', 'street_2', 'city', 'state', 'postal code'.
but when saving all the data it returns this error: SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'
but it is supposed that when the relation is there it returns the id, isn't it?
1 Reply
the error was because in my migration I did not have the timestamps