Latest JAS v1.1.0
144 plugins online

1:* filtering should use reference ID instead of referenced field

Currently when setting the 1:* reference field value the MySQL use referenced field instead of the ID field of the referenced module. Using the former is rather useless since that's effectively the ID field of the original module.


So change:

FROM `module`

LEFT JOIN `referenceModule` ON `module`.`nr`=`referenceModule`.`referenceField`

WHERE referenceModule `.`referenceField `="123"


To: 

FROM `module`

LEFT JOIN `referenceModule` ON `module`.`nr`=`referenceModule`.`referenceField`

WHERE referenceModule `.`referenceID`="123"


Do note however that this means the validations will also need to apply to the ID field. In other words the type of the reference field and the reference may differ there it should validate against the field type of the reference ID field. 


Additionally this issue may also apply to other storage engines!

JAS15DEC001
Project
JAS Core (JAS)
Rank
3
Workflow
Version
Due in version
Fixed in changeset
3834

Updates (2)

Saturday 12th of December 2015 at 13:10 :
Issue updated
Issue type: Bug => Change
Wednesday 30th of March 2016 at 10:31 :
Issue updated
Workflow: Open => Closed
Fixed in changeset: 0 => 3834

Files (0)

No files