tags:

views:

47

answers:

1

i got a (or rather 2) small question(s)

from doctrine manual

$conn->export->createTable('test', array('name' => array('type' => 'string')));
$conn->execute('INSERT INTO test (name) VALUES (?)', array('jwage'));

whats the $conn->export() abt. i mean, the export(). whats it for?

has it got any thing to do with the export option in the data fixtures yaml file? whats does export and validate do? any where i can get a list of available "attributes" and what they do?

User:
  columns:
    ...
  attributes:
    export: all
    validate: true
+1  A: 

It has nothing to do with the attributes. It is just the module/class that handels database creation/altering.

look at this page in the manual: http://www.doctrine-project.org/documentation/manual/1_2/en/database-abstraction-layer#export

The Export module provides methods for managing database structure. The methods can be grouped based on their responsibility: create, edit (alter or update), list or delete (drop) database elements.

samsam
so in this case, what does "export: all" do? and i can also edit/list/delete tables using $conn->export()->editTable() for example?
iceangel89
see: http://www.doctrine-project.org/documentation/manual/1_2/en/configuration#exportingThe attribute "export: all" tells the yml parser to export all tabels and constraints. I think this is the default setting.
samsam
so they are not only used in many to many relations? cos in the docs, i only see these options used in many to many relations
iceangel89