[Environment]
PHP 5.3.19
Cakephp 2.6.1
Is it possible to associate if there are multiple foreign keys as shown below?
[hoge_one table]
id,
foreign_code_1,
foreign_code_2,
date,
[hoge_many table]
id,
foreign_code_1,
foreign_code_2,
hoge,
data,
etc
h The merge key that connects the hoge_many table to hoge_one is:
Only foreign_code_1, foreign_code_2.(no foreign key added)
h I would like to associate from hoge_one to hoge_many by hasmany.
Thank you for your cooperation.
php cakephp
public$hasMany=array(
'HogeMany' = > array(
'foreignKey' = > 'foreign_code_1',
'conditions' = > array('HogeMany.foreign_code_2' = > 'HogeOne'.foreign_code_2),
)
);
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.