Skip to content

Instantly share code, notes, and snippets.

@Fi1osof
Created October 5, 2014 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fi1osof/10a6904fb5c25af1d55f to your computer and use it in GitHub Desktop.
Save Fi1osof/10a6904fb5c25af1d55f to your computer and use it in GitHub Desktop.
<?php
// SocietyBlogTopic
'aggregates' =>
array (
'Blog' =>
array (
'class' => 'SocietyBlog',
'key' => 'id',
'local' => 'blogid',
'foreign' => 'id',
'cardinality' => 'one',
'owner' => 'foreign',
),
'Topic' =>
array (
'class' => 'SocietyTopic',
'key' => 'id',
'local' => 'topicid',
'foreign' => 'id',
'cardinality' => 'one',
'owner' => 'foreign',
),
),
// SocietyTopic
'composites' =>
array (
'Attributes' =>
array (
'class' => 'SocietyTopicAttributes',
'local' => 'id',
'foreign' => 'resourceid',
'cardinality' => 'one',
'owner' => 'local',
),
'TopicBlogs' =>
array (
'class' => 'SocietyBlogTopic',
'local' => 'id',
'foreign' => 'topicid',
'cardinality' => 'many',
'owner' => 'local',
),
),
// SocietyBlog
'composites' =>
array (
'Attributes' =>
array (
'class' => 'SocietyBlogAttributes',
'local' => 'id',
'foreign' => 'resourceid',
'cardinality' => 'one',
'owner' => 'local',
),
'BlogTopics' =>
array (
'class' => 'SocietyBlogTopic',
'local' => 'id',
'foreign' => 'blogid',
'cardinality' => 'many',
'owner' => 'local',
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment