symfony ORM

7 downloads 54448 Views 27KB Size Report
DB. $ symfony propel-build-schema xml. MODEL CLASSES. /lib/model/om. /lib/ model. /lib/model/map. Object/Relational. Mapping (ORM) use u se. SYMFONY ...
symfony ORM CREOLE

PROPEL use

Object/Relational Mapping (ORM)

use

Database Abstraction

SYMFONY FRAMEWORK

DATABASE

id

id

title content created_at

article_id (FK) author content created_at

PostgreSQL Oracle MySQL SQL Server SQLite

SYMFONY CLI

myproject/config

blog_comment

MODEL CLASSES

(only database commands)

/lib/model generate

$ symfony propel-build-sql

use

d

e rib esc

Article.php ArticlePeer.php Comment.php CommentPeer.php

$ symfony propel-insert-sql

/lib/model/om schema.yml

DB

same information

blog_article

generate

$ symfony propel-build-schema xml

use

$ symfony propel-build-model

schema.xml generate

BaseArticle.php BaseArticlePeer.php BaseComment.php BaseCommentPeer.php

/lib/model/map $ symfony propel-generate-crud

ArticleMapBuilder.php CommentMapBuilder.php

description of the relational model to do the mapping

use

propel.ini DB connection settings and propel configuration

http://andreiabohner.wordpress.com

myproject/config or apps/myapp/config

DB connection settings to access the data model

use

$ symfony propel-build-db

database.yml

files used to add custom methods and properties to the model objects base classes, modified by propel build model metadata information about the table