Symfony – Propel – Using A Prefix For The Tables But Not For The Classes

What we want is to have a prefix for the database tables (for example, blog_) but not for the classes generated by Propel. That is, we want Post and not BlogPost as the name for the class.

We can achieve that, by this schema.yml:

blog_post
  _attributes: { phpName: Post }
  id: ~
  content: longvarchar
This entry was posted in Symfony. Bookmark the permalink.

Leave a Reply