| 1 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
/**
|
|
|
5 |
* This class defines the structure of the 'product' table.
|
|
|
6 |
*
|
|
|
7 |
*
|
|
|
8 |
* This class was autogenerated by Propel 1.4.2 on:
|
|
|
9 |
*
|
|
|
10 |
* Fri Aug 5 09:39:37 2011
|
|
|
11 |
*
|
|
|
12 |
*
|
|
|
13 |
* This map class is used by Propel to do runtime db structure discovery.
|
|
|
14 |
* For example, the createSelectSql() method checks the type of a given column used in an
|
|
|
15 |
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
|
|
16 |
* (i.e. if it's a text column type).
|
|
|
17 |
*
|
|
|
18 |
* @package lib.model.map
|
|
|
19 |
*/
|
|
|
20 |
class ProductTableMap extends TableMap {
|
|
|
21 |
|
|
|
22 |
/**
|
|
|
23 |
* The (dot-path) name of this class
|
|
|
24 |
*/
|
|
|
25 |
const CLASS_NAME = 'lib.model.map.ProductTableMap';
|
|
|
26 |
|
|
|
27 |
/**
|
|
|
28 |
* Initialize the table attributes, columns and validators
|
|
|
29 |
* Relations are not initialized by this method since they are lazy loaded
|
|
|
30 |
*
|
|
|
31 |
* @return void
|
|
|
32 |
* @throws PropelException
|
|
|
33 |
*/
|
|
|
34 |
public function initialize()
|
|
|
35 |
{
|
|
|
36 |
// attributes
|
|
|
37 |
$this->setName('product');
|
|
|
38 |
$this->setPhpName('Product');
|
|
|
39 |
$this->setClassname('Product');
|
|
|
40 |
$this->setPackage('lib.model');
|
|
|
41 |
$this->setUseIdGenerator(true);
|
|
|
42 |
// columns
|
|
|
43 |
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
|
|
44 |
$this->addColumn('PRICE', 'Price', 'FLOAT', false, null, null);
|
|
|
45 |
$this->addColumn('A_PRIMARY_STRING', 'APrimaryString', 'VARCHAR', false, 64, null);
|
|
|
46 |
// validators
|
|
|
47 |
} // initialize()
|
|
|
48 |
|
|
|
49 |
/**
|
|
|
50 |
* Build the RelationMap objects for this table relationships
|
|
|
51 |
*/
|
|
|
52 |
public function buildRelations()
|
|
|
53 |
{
|
|
|
54 |
$this->addRelation('Translation', 'ProductI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), null, null);
|
|
|
55 |
} // buildRelations()
|
|
|
56 |
|
|
|
57 |
/**
|
|
|
58 |
*
|
|
|
59 |
* Gets the list of behaviors registered for this table
|
|
|
60 |
*
|
|
|
61 |
* @return array Associative array (name => parameters) of behaviors
|
|
|
62 |
*/
|
|
|
63 |
public function getBehaviors()
|
|
|
64 |
{
|
|
|
65 |
return array(
|
|
|
66 |
'symfony' => array('form' => 'true', 'filter' => 'true', ),
|
|
|
67 |
'symfony_behaviors' => array(),
|
|
|
68 |
'symfony_i18n' => array('i18n_table' => 'product_i18n', ),
|
|
|
69 |
);
|
|
|
70 |
} // getBehaviors()
|
|
|
71 |
|
|
|
72 |
} // ProductTableMap
|