[Deprecated] DMZ 1.6.2 (DataMapper OverZealous Edition) |
[eluser]12vunion[/eluser]
[quote author="Oblique" date="1263923915"]include_related_count deep relationship Code: $user->include_related_count('user_profile/driver', 'drivers') gives me Quote:Table 'DB.drivers_users' doesn't exist while i assumed that dmz would query user_profiles_drivers for that count what exactly do i not understand here? user guide says deep relations are available for this method[/quote] It looks for table joins alphabetically. If you had two models, user_profile and driver, it would look for their tables (user_profiles, drivers) and combine them alphabetically to make a join table. Thus, your join table should be drivers_user_profiles. Table Naming Rules |
Welcome Guest, Not a member yet? Register Sign In |