Permalink
Browse files

Revove generated models and tables, #15

  • Loading branch information...
1 parent 7e4ad4a commit dce5fca478b10022806e5b1f7c5c6be09a1cc636 @fruit committed Oct 20, 2011
Showing with 1 addition and 852 deletions.
  1. +1 −1 .gitignore
  2. +0 −15 test/fixtures/project/lib/model/doctrine/AirCompany.class.php
  3. +0 −19 test/fixtures/project/lib/model/doctrine/AirCompanyTable.class.php
  4. +0 −15 test/fixtures/project/lib/model/doctrine/Article.class.php
  5. +0 −19 test/fixtures/project/lib/model/doctrine/ArticleTable.class.php
  6. +0 −19 test/fixtures/project/lib/model/doctrine/BlogPost.class.php
  7. +0 −15 test/fixtures/project/lib/model/doctrine/BlogPostComment.class.php
  8. +0 −70 test/fixtures/project/lib/model/doctrine/BlogPostCommentTable.class.php
  9. +0 −149 test/fixtures/project/lib/model/doctrine/BlogPostTable.class.php
  10. +0 −15 test/fixtures/project/lib/model/doctrine/BlogPostVote.class.php
  11. +0 −11 test/fixtures/project/lib/model/doctrine/BlogPostVoteTable.class.php
  12. +0 −15 test/fixtures/project/lib/model/doctrine/Book.class.php
  13. +0 −11 test/fixtures/project/lib/model/doctrine/BookTable.class.php
  14. +0 −15 test/fixtures/project/lib/model/doctrine/Comment.class.php
  15. +0 −19 test/fixtures/project/lib/model/doctrine/CommentTable.class.php
  16. +0 −15 test/fixtures/project/lib/model/doctrine/Device.class.php
  17. +0 −19 test/fixtures/project/lib/model/doctrine/DeviceTable.class.php
  18. +0 −15 test/fixtures/project/lib/model/doctrine/Food.class.php
  19. +0 −15 test/fixtures/project/lib/model/doctrine/FoodReordered.class.php
  20. +0 −19 test/fixtures/project/lib/model/doctrine/FoodReorderedTable.class.php
  21. +0 −11 test/fixtures/project/lib/model/doctrine/FoodTable.class.php
  22. +0 −15 test/fixtures/project/lib/model/doctrine/PostVote.class.php
  23. +0 −11 test/fixtures/project/lib/model/doctrine/PostVoteTable.class.php
  24. +0 −15 test/fixtures/project/lib/model/doctrine/RelCategory.class.php
  25. +0 −19 test/fixtures/project/lib/model/doctrine/RelCategoryTable.class.php
  26. +0 −15 test/fixtures/project/lib/model/doctrine/RelCulture.class.php
  27. +0 −19 test/fixtures/project/lib/model/doctrine/RelCultureTable.class.php
  28. +0 −15 test/fixtures/project/lib/model/doctrine/RelSite.class.php
  29. +0 −15 test/fixtures/project/lib/model/doctrine/RelSiteCulture.class.php
  30. +0 −19 test/fixtures/project/lib/model/doctrine/RelSiteCultureTable.class.php
  31. +0 −15 test/fixtures/project/lib/model/doctrine/RelSiteSetting.class.php
  32. +0 −19 test/fixtures/project/lib/model/doctrine/RelSiteSettingTable.class.php
  33. +0 −19 test/fixtures/project/lib/model/doctrine/RelSiteTable.class.php
  34. +0 −15 test/fixtures/project/lib/model/doctrine/Repository.class.php
  35. +0 −11 test/fixtures/project/lib/model/doctrine/RepositoryTable.class.php
  36. +0 −15 test/fixtures/project/lib/model/doctrine/SkipOnColumnUpdateTest.class.php
  37. +0 −19 test/fixtures/project/lib/model/doctrine/SkipOnColumnUpdateTestTable.class.php
  38. +0 −15 test/fixtures/project/lib/model/doctrine/Tree.class.php
  39. +0 −19 test/fixtures/project/lib/model/doctrine/TreeTable.class.php
  40. +0 −15 test/fixtures/project/lib/model/doctrine/University.class.php
  41. +0 −11 test/fixtures/project/lib/model/doctrine/UniversityTable.class.php
  42. +0 −15 test/fixtures/project/lib/model/doctrine/Weapon.class.php
  43. +0 −19 test/fixtures/project/lib/model/doctrine/WeaponTable.class.php
  44. 0 test/fixtures/project/lib/model/doctrine/base/.gitignore
View
@@ -6,5 +6,5 @@ README
/test/fixtures/project/log/*
/test/fixtures/project/data/sql/*
/test/fixtures/project/data/sqlite/*
-/test/fixtures/project/lib/model/doctrine/base/*
+/test/fixtures/project/lib/model/*
!.gitignore
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * AirCompany
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- *
- * @package sfCacheTaggingPlugin
- * @subpackage model
- * @author Your name here
- * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
- */
-class AirCompany extends BaseAirCompany
-{
-}
@@ -1,19 +0,0 @@
-<?php
-
-/**
- * AirCompanyTable
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- */
-class AirCompanyTable extends Doctrine_Table
-{
- /**
- * Returns an instance of this class.
- *
- * @return object AirCompanyTable
- */
- public static function getInstance()
- {
- return Doctrine_Core::getTable('AirCompany');
- }
-}
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * Article
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- *
- * @package sfCacheTaggingPlugin
- * @subpackage model
- * @author Your name here
- * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
- */
-class Article extends BaseArticle
-{
-}
@@ -1,19 +0,0 @@
-<?php
-
-/**
- * ArticleTable
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- */
-class ArticleTable extends Doctrine_Table
-{
- /**
- * Returns an instance of this class.
- *
- * @return object ArticleTable
- */
- public static function getInstance()
- {
- return Doctrine_Core::getTable('Article');
- }
-}
@@ -1,19 +0,0 @@
-<?php
-
-/**
- * BlogPost
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- *
- * @package sfCacheTaggingPlugin
- * @subpackage model
- * @author Your name here
- * @version SVN: $Id: Builder.php 6716 2009-11-12 19:26:28Z jwage $
- */
-class BlogPost extends BaseBlogPost
-{
- public function getUnknownTemplate ()
- {
- return $this->getTempleteWithInvoker('UnknownTemplate', 'callMe');
- }
-}
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * BlogPostComment
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- *
- * @package sfCacheTaggingPlugin
- * @subpackage model
- * @author Your name here
- * @version SVN: $Id: Builder.php 6716 2009-11-12 19:26:28Z jwage $
- */
-class BlogPostComment extends BaseBlogPostComment
-{
-}
@@ -1,70 +0,0 @@
-<?php
-
-class BlogPostCommentTable extends Doctrine_Table
-{
- /**
- * Returns BlogPostCommentTable instance
- *
- * @return BlogPostCommentTable
- */
- public static function getInstance ()
- {
- return Doctrine::getTable('BlogPostComment');
- }
-
- /**
- * Initialize new Doctrine_Query instance or clones if $q is passed
- *
- * @param null|Doctrine_Query $q optional
- * @return Doctrine_Query
- */
- private function createQueryIfNull (Doctrine_Query $q = null)
- {
- return is_null($q) ? self::getInstance()->createQuery('bpc') : clone $q;
- }
-
- /**
- * Adds all BlogPostCommentTable columns to the query
- *
- * @param Doctrine_Query $q
- * @return {$TableName}Table
- */
- public function addSelectTableColumns (Doctrine_Query $q)
- {
- $q->addSelect("{$q->getRootAlias()}.*");
-
- return $this;
- }
-
- /**
- * Default getQuery method to work directly with Doctrine_Query object
- *
- * @param Doctrine_Query $q
- * @return Doctrine_Query
- */
- public function getQuery (Doctrine_Query $q = null)
- {
- $q = $this->createQueryIfNull($q);
-
- $this
- ->addSelectTableColumns($q)
- ;
-
- return $q;
- }
-
- /**
- * Method to fetch query with predefined filters
- *
- * @param Doctrine_Query $q
- * @return BlogPostCommentTable
- */
- public function get (Doctrine_Query $q = null)
- {
- $q = $this->getQuery($q);
-
- return $this;
- }
-
-
-}
@@ -1,149 +0,0 @@
-<?php
-
-class BlogPostTable extends Doctrine_Table
-{
- /**
- * Returns BlogPostTable instance
- *
- * @return BlogPostTable
- */
- public static function getInstance ()
- {
- return Doctrine::getTable('BlogPost');
- }
-
- /**
- * Initialize new Doctrine_Query instance or clones if $q is passed
- *
- * @param null|Doctrine_Query $q optional
- * @return Doctrine_Query
- */
- private function createQueryIfNull (Doctrine_Query $q = null)
- {
- return is_null($q) ? self::getInstance()->createQuery('bp') : clone $q;
- }
-
- /**
- * Adds all BlogPostTable columns to the query
- *
- * @param Doctrine_Query $q
- * @return {$TableName}Table
- */
- public function addSelectTableColumns (Doctrine_Query $q)
- {
- $q->addSelect("{$q->getRootAlias()}.*");
-
- return $this;
- }
-
- /**
- * Adds count by foreign table as %foreign_table_name%_count column
- *
- * @return BlogPostCommentTable
- */
- public function addSelectBlogPostCommentCount (Doctrine_Query $q)
- {
- $subq = $q->createSubquery()
- ->select('count(bpcc.blog_post_id)')
- ->from('BlogPostComment bpcc')
- ->where("{$q->getRootAlias()}.id = bpcc.blog_post_id")
- ;
-
- $subModelNameTableized = Doctrine_Inflector::tableize('BlogPostComment');
-
- $q->addSelect("({$subq->getDql()}) {$subModelNameTableized}_count");
-
- return $this;
- }
-
- /**
- * Adds join to the BlogPostCommentTable and adds its columns to SELECT block
- *
- * @param Doctrine_Query $q
- * @return BlogPostTable
- */
- public function withBlogPostComment (Doctrine_Query $q)
- {
- $q
- ->addSelect('bpc.*')
- ->leftJoin("{$q->getRootAlias()}.BlogPostComment bpc")
- ;
-
- return $this;
- }
-
-
- /**
- *
- * @param Doctine_Query $q
- * @return Doctine_Query
- */
- public function getPostsWithCommentQuery (Doctine_Query $q = null)
- {
- $q = $this->getPostsQuery($q);
-
- $this
- ->withBlogPostComment($q)
- ;
-
- return $q;
- }
-
- /**
- * Adds Translation table to BlogPostTable with specified culture (or system-user culture)
- *
- * @param Doctrine_Query $q
- * @param string $culture Lowercased culture code
- * @return BlogPostTable
- */
- public function withI18n (Doctrine_Query $q, $culture = null)
- {
- $culture = is_null($culture) ? sfContext::getInstance()->getUser()->getCulture() : $culture;
-
- $q
- ->addSelect("{$q->getRootAlias()}t.*")
- ->leftJoin(
- "{$q->getRootAlias()}.Translation {$q->getRootAlias()}t WITH {$q->getRootAlias()}t.lang = ?",
- $culture
- )
- ;
-
- return $this;
- }
-
- /**
- *
- * @param Doctine_Query $q
- * @return Doctine_Query
- */
- public function getPostsWithCommentAndCountQuery (Doctine_Query $q = null)
- {
- $q = $this->getPostsQuery($q);
-
- $this
- ->addSelectBlogPostCommentCount($q)
- ->withBlogPostComment($q)
- ;
-
- return $q;
- }
-
- /**
- *
- * @param Doctine_Query $q
- * @return Doctine_Query
- */
- public function getPostsQuery (Doctine_Query $q = null)
- {
- $q = $this->createQueryIfNull($q);
-
- $q->orderBy('id asc')->addWhere('is_enabled = 1');
-
- $this
- ->addSelectTableColumns($q)
- ->withI18n($q)
- ;
-
- return $q;
- }
-}
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * BlogPostVote
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- *
- * @package sfCacheTaggingPlugin
- * @subpackage model
- * @author Your name here
- * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
- */
-class BlogPostVote extends BaseBlogPostVote
-{
-}
@@ -1,11 +0,0 @@
-<?php
-
-
-class BlogPostVoteTable extends Doctrine_Table
-{
-
- public static function getInstance()
- {
- return Doctrine_Core::getTable('BlogPostVote');
- }
-}
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * Book
- *
- * This class has been auto-generated by the Doctrine ORM Framework
- *
- * @package sfCacheTaggingPlugin
- * @subpackage model
- * @author Your name here
- * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
- */
-class Book extends BaseBook
-{
-}
@@ -1,11 +0,0 @@
-<?php
-
-
-class BookTable extends Doctrine_Table
-{
-
- public static function getInstance()
- {
- return Doctrine_Core::getTable('Book');
- }
-}
Oops, something went wrong.

0 comments on commit dce5fca

Please sign in to comment.