Skip to content

Instantly share code, notes, and snippets.

@pjedrzejewski
Created September 25, 2011 18:53
Show Gist options
  • Save pjedrzejewski/1240959 to your computer and use it in GitHub Desktop.
Save pjedrzejewski/1240959 to your computer and use it in GitHub Desktop.
Easy categorizing with Symfony2, gist #3.
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Application\Bundle\AssortmentBundle\Entity\Category" table="sylius_assortment_category">
<id name="id" column="id" type="integer">
<generator strategy="AUTO" />
</id>
<one-to-many field="products" target-entity="Application\Bundle\AssortmentBundle\Entity\Product" mapped-by="category" />
</entity>
</doctrine-mapping>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment