[FLOW3-general] Diffrent packages with simillar models + Doctrine

Marcus 'biesior' Biesioroff vsbies at wp.pl
Mon Mar 21 20:09:42 CET 2011


W dniu 11-03-21 14:44, Dawid Pacholczyk pisze:
> Hello List,
> for example I want to create a sociall application that is supporting
> Blog and Forum. Both Packages will contain DIFFRENT Post models.
> Doctrine is creating a table with the same name as model. How will it
> act if I`ll have to packages with Post model ?
>
> Best regards,
> Dawid Pacholczyk

I think that best option is manual setting @table attribute for model's 
class to some individual value, maybe it could be even better to set 
this as default to 'package_modeln' by model kickstarter (gentlemen ?)

ie.:




/**
  * A Post for Foo package
  *
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License, version 3 or later
  * @scope prototype
  * @entity
  * @table(name="foo_post")
  */
class post {
	/**
	 * @identity
	 *
	 * @var integer
	 * @Id
	 * @GeneratedValue
	 */
	protected $id;

	/**
	 * @var string
	 * @validate StringLength(minimum = 1, maximum = 100)
	 * @identity
	 * @Column(length="100")
	 */
	protected $title;

}




-- 
Marcus 'biesior' Biesioroff
http://www.typo3.pl | TYPO3 Polish Community
T3CI


More information about the FLOW3-general mailing list