doctrine

How can i add a autoincrement to a column with a doctrinemigration?

I'am writing a migration in Doctrine and i have to add a autoincrement to a column, but i don't find any information to do so via the changeColumn-method. ...

How to integrate Doctrine 2 (alpha release) and Zend Framework

Hi, I want to integrate doctrine 2 with zend framework 1.9. Please give me some link or some tutorial to integrate doctrine 2. I have worked doctrine 1.1. But now I want to integrate doctrine 2. I think which have some different approach to add doctrine 2. Thanks Raju Mazumder ...

8 byte Integer with Doctrine and PHP

Hi, the players: 64bit linux with php 5 (ZendFramework 1.10.2) PostgreSQL 8.3 Doctrine 1.2 Via a Flash/Flex client i get an 8byte integer value. the field in the database is an BIGINT (8 byte) PHP_INT_SIZE show that system supports 8byte integer. printing out the value in the code as it is and as intval() leads to this...

Doctrine toarray does not convert relations.

Hi, so..I followed doctrine documnetation to get started. Here is the documentation http://www.doctrine-project.org/documentation/manual/1_2/en/working-with-models#dealing-with-relations:retrieving-related-records My code is $User = Doctrine_Core::getTable("User")->find(1); when I access relations by $User->Phonenumbers, it works. ...

Symfony/Doctrine: Unserialize in action vs template

Hi, Can anyone tell me why calling "unserialize" works fine in an action but gives an offset error in a template? It's basically possible to unserialize a database text result into a variable in an action and pass it to template, in which case it displays fine: $this->clean = unserialize($this->raw); <?php echo $clean ?> But not if ...

How can custom properties be added to a column in Doctrine

With doctrine if you execute this code $columns = $accountTable->getColumns(); foreach ($columns as $column) { print_r($column); } you could get for example this as result: Array ( [type] => integer [length] => 20 [autoincrement] => 1 [primary] => 1 ) Array ( [type] => string [length] => 255 ) Is there a...

Can a table have multiple slugs in Doctrine?

Is it possible to have multiple slugs on one table in Doctrine? I tried this in my yaml-file: Article: tableName: tst_article actAs: Sluggable: unique: true fields: [title] canUpdate: true Sluggable: unique: true fields: [text] name: secondSlug columns: id: type: integ...

Reading directly from the Doctrine Searchable index table

I've got a Doctrine table with the Searchable behavior enabled. Whenever a record is created, an index is made in another table. I have a model called Entry and the behavior automatically created the table entry_index. My question now is: How can I - without using the search(...) methods of my model use the data from this table? I wan...

doctrine - generate model from db, but only a specified table?

Hi, is it possible to generate models from db, but only specified tables in doctrine? I can't locate a method in Doctrine_Core class for this. Thanks. ...

Mysql_insert_id with Doctrine

Hi! I have a couple of tables (mySQL) that i would like to update with the help of Doctrine. The products table id is auto-incrementing, and here's a brief description on what I would like to do: $prod = new Products(); $prod->type = '0'; $categ = new CategoriesToProducts(); $categ->cat = '111'; $categ->product = $...

How do I get total record count from Doctrine_Pager?

Hi, I am tryign to use Doctrine_Pager for the first time. So I have the following code. $q = Doctrine_Query::create() ->from("Member m"); $pager = new Doctrine_Pager($q,1,10); $result = $pager->execute(); I need to know total record count of Member table. How do I get it?? ...

Doctrine Text Analyzers with other languages

I am planing on using Searchable templates with Doctrine and was wondering if there is a way to add / modify the stop-keywords based on the language of the text inserted in to the database? ...

What is the best way to add and order to Doctrine Nested Set Trees?

What is the best way to add a sense of order in Doctrine Nested Sets? The documention contains several examples of how to get al the childeren of a specific node $category->getNode()->getSiblings() But how can I for example: change the position of the fourth sibling to the second position get only the second sibling add a sibling b...

doctrine regenerating models from yml only the base models?

I am wondering if there is a way to handle this more elegantly. After generating the "main" models and base models from yml files the first time I have to add at the very leased an include for the base model to the "main" model like so: include_once 'generated/BaseBlog.php'; At the moment before I regenerate the models I move my chan...

Doctrine stupid or me stupid?

I want to use a single Doctrine install on our server and serve multiple websites. Naturally the models should be maintained in the websites' modelsfolder. I have everything up (and not running) like so: Doctrine @ /CustomFramework/Doctrine Websites @ /var/www/vhosts/custom1.com/ /var/www/vhosts/custom2.com/ Generating works fine...

PHP Doctrine frustration: loading models doesn't work..?

I'm almost losing it, i really hope someone can help me out! I'm using Doctrine with CodeIgniter. Everything is setup correctly and works until I generate the classes and view the website. Fatal error: Class 'BaseObjecten' not found in /var/www/vhosts/domain.com/application/models/Objecten.php on line 13 I'm using the following bo...

doctrine save method update/insert based on unique field

I read so many post and I found many variations about how to get save to insert vs update but couldn't find something that would work for me. I am guessing that preSave would be the way to go if preSave() is being executed automaticly by save() if present. columns: email: type: string(255) unique: true email: true I nee...

Integrating OpenID into Symfony 1.4?

I've tried integrating sfPHPOpenIdPlugin but that hit a dead-end since it's built for Symfony 1.2 and relies on deprecated PHP functionality; I also had a go with sfGoogleLoginPlugin which did authenticate correctly but lacks extended capability to retrieve user details (+ would restrict me to Google; obviously). I'm thinking the most v...

How can I store HTML in a Doctrine YML fixture

I am working with a CMS-type site in Symfony 1.4 (Doctrine 1.2) and one of the things that is frustrating me is not being able to store HTML pages in YML fixtures. Instead I have to create SQL backups of the data if I want to drop and rebuild which is a bit of a pest when Symfony/Doctrine has a fantastic mechanism for doing exactly this....

Doctrine: hasOne gives errors :(

Hi, when I am trying to give a relationship to user->group I get an error here is my code <?php class User extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('username', 'string', 255, array('unique' => 'true')); $this->hasColumn('password', 'string', 255); $this->hasColumn('em...