Typical "errors" using the GenericORMapper

Das Forum ist für das Melden von Bugs gedacht. // This forum is intended to report bugs with the APF.
Beiträge: 4527
Registriert: 04.11.2007, 16:13:53

Typical "errors" using the GenericORMapper

Beitrag von dr.e. » 10.01.2009, 13:11:32


this thread is intended to describe typical impementation errors using the GenericORMapper. Each error will be replied with the corresponding fix. If you are faced with other errors during development, please post here

1. Unknown table in WHERE clause:
If you are using the GenericCriterionObject to define the loading conditions and a "wrong" relation key is used, this results in a
#1109 - Unknown table 'ent_xyz' in on clause

error message. The cause of the error is, that the JOIN statement does not fit to the referenced object table. You must thus take care, that if you use the loadNotRelatedObjects() to load objects, the relation keys applied to the GenericCriterionObject fit to the objects to be loaded.

Example from the usermanagement module:
If you add not

Code: Alles auswählen

return $oRM->loadNotRelatedObjects($role,'Role2User',$crit);

Code: Alles auswählen

return $oRM->loadNotRelatedObjects($role,'Role2User',$crit);
to your code, you get a #1109 - Unknown table 'ent_role in on clause error.

2. "Undefined index: [..]"
Undefined index: in combination with Undefined index: xyz and a futher statement error then occures, when the mapper is created SessionSingleton and you have changed the configuration file during this session. To fix this, clear your session cache.
Viele Grüße,


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast