RedBeanPHP

easy ORM for PHP

Formatting Tables

In RedBeanPHP 3.0 this feature is no longer supported. To format a table, you implement a method called formatBeanTable() in the format class. RedBeanPHP will pass the type of the current bean and expects the desired field name as a result. In this example, we prefix all our tables with 'cms_'. For instance, a bean of type 'page' will be stored in table 'cms_page'.

Also see: Default Schema Conventions (for use with legacy databases)

For an example, see: custom mapping.



User contributed notes. Please use the comment section to provide tips, notes and examples. To ask for support or to provide feedback use the forum. For bug reports use Github Issue Tracker.

Site comments powered by Disqus

page generated in 0.0058548450469971 sec.