data icon indicating copy to clipboard operation
data copied to clipboard

Join class does not support joining tables by non-id fields

Open DarkSide666 opened this issue 3 years ago • 2 comments

Currently we do not support joining tables by non-id fields because we don't know how to save records in such case.

See #802 and "Joining tables on non-id fields is not implemented yet" exception in Join class.

DarkSide666 avatar Dec 10 '20 17:12 DarkSide666

@DarkSide666 can you please provide a minimalistic code to reproduce?

mvorisek avatar May 29 '22 11:05 mvorisek

here is a repro code: https://github.com/atk4/data/blob/f89264b0b7667baacef0aad420b421907d1abe7d/tests/JoinSqlTest.php#L32-L36

mvorisek avatar Jul 07 '22 08:07 mvorisek

Currently there are these problems:

  • Join::reverse = true with join on non-ID field is not supported (Joining tables on non-id fields is not implemented yet exception is thrown)
  • foreign ID field type is hardcoded to integer
  • join ID field type is hardcoded to integer

mvorisek avatar Feb 13 '23 18:02 mvorisek