rendered paste body<?phpclass Offering extends AppModel { var $name = "Offering"; var $hasAndBelongsToMany = array('Listing' => array('className' => 'Listing', 'joinTable' => 'listings_offerings', 'foreignKey' => 'offering_id', 'associationForeignKey'=> 'listing_id', 'conditions' => '', 'order' => '', 'limit' => '', 'unique' => true, 'finderQuery' => '', 'deleteQuery' => '', ) ); function publish($id) { $this->id = $id; $this->saveField("published", 1); } function unpublish($id) { $this->id = $id; $this->saveField("published", 0); }}?><?phpclass Listing extends AppModel { var $name = "Listing"; //var $hasAndBelongsToMany = array( 'Selections' => array( 'className' => 'Selection', 'joinTable' => 'selections_listings', 'foreignKey' => 'listing_id')); var $hasAndBelongsToMany = array('Selection' => array('className' => 'Selection', 'joinTable' => 'listings_selections', 'foreignKey' => 'listing_id', 'associationForeignKey'=> 'selection_id', 'conditions' => '', 'order' => '', 'limit' => '', 'unique' => true, 'finderQuery' => '', 'deleteQuery' => '', ), 'Offering' => array('className' => 'Offering', 'joinTable' => 'listings_offerings', 'foreignKey' => 'listing_id', 'associationForeignKey'=> 'offering_id', 'conditions' => '', 'order' => '', 'limit' => '', 'unique' => true, 'finderQuery' => '', 'deleteQuery' => '', ) ); function publish($id) { $this->id = $id; $this->saveField("published", 1); } function unpublish($id) { $this->id = $id; $this->saveField("published", 0); }}?>