Created
December 8, 2011 18:46
-
-
Save davidjmemmett/1448004 to your computer and use it in GitHub Desktop.
multiple aggregate_column behaviours in Propel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `table_1` ADD | |
( | |
`nb_something_else` INTEGER | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `table_1` ADD | |
( | |
`nb_something` INTEGER, | |
`nb_something_else` INTEGER | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table name="table_1"> | |
<behavior name="auto_add_pk" /> | |
<behavior name="aggregate_column"> | |
<parameter name="name" value="nb_something"/> | |
<parameter name="foreign_table" value="table_2"/> | |
<parameter name="expression" value="COUNT(id)"/> | |
</behavior> | |
<behavior name="aggregate_column"> | |
<parameter name="name" value="nb_something_else"/> | |
<parameter name="foreign_table" value="table_3"/> | |
<parameter name="expression" value="COUNT(id)"/> | |
</behavior> | |
<column name="name" type="VARCHAR" size="255" required="true" /> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment