Menu

#6 Generate N:M methods

open
Feature (6)
5
2010-11-17
2010-11-17
No

For a n:m relation e.g. book_x_libraries
It would be nice to have methods like

$book->getLibraries();

Which actually skipps the method in between ($book->getBook_x_libraries());
This can be done by examining the table
If it contains more than one FK and these two FK's are combined in a key or a UNIQUE, we can generate a method like this

Discussion


Log in to post a comment.

Auth0 Logo