Closed SusanthCom closed 7 years ago
+1
Thanks SusanthCom for your comment. I know the naming scheme is a bit controversial. However many database already use the single underscore for linking tables. In my experience it's always possible to avoid using the '_' for regular tables, it just takes a little more imagination sometimes to come up with a good name for the bean.
Hi @gabordemooij,
Thank you Very much for fast response.
I respect your view wholeheartedly and like RedBeanPHP. Will try single word naming OR follow the alternative : Prefixes
But from an ORM user's perspective, One can see, many of leading open source projects are using _
in table names extensively.
If you still opt to stick to the current implementation as default. Thats fine 👍 From the clean source code, documentation and RoadMap its clear that : you and team, invested much time and effort in coding and filtering out the user requests. Hats off 🎩🎩
At least a flag based implementation, roughly, something like below, will be a big help !!!
R::setup( string $dsn = NULL, string $username = NULL, string $password = NULL, boolean $frozen = FALSE, string $fancyTableName = FALSE ) if
$fancyTableName
is TRUE.
_
is allowed in table names.___
is used in table names when mapping many to many relations.
Advantages of Implementation :
constant
definition or R::renameAssociation()
mapping calls !ownBeanList
and sharedBeanList
naming convention remains sameR::xdispense()
just do it in one way, always : R::dispense()
!ThankYou Susanth
Hi,
Currently ReadBean defaults, reserves
_
to represent many to many mapping and don't allow_
to be used in table names.Though this limitation could be bypassed by following this
An improved default naming scheme would be :
Allow
_
in table namingUse
___
as a default to represent many to many mapping. ( 3 underscore is more readable; even 2 will do ).Hai @gabordemooij and team members, my humble opinion is that, making this suggested behaviour as default by keeping backward compatibility, makes ReadBean more beautiful ( especially for early ReadBean adopters ).
Hats off to ❤️RedBeanPHP❤️ team, for your wonderful work !!!
Those who support this view, please up vote 👍 to let the team know how important it is 😄
Thnak you all Susanth