Questions tagged [doctrine-1.2]

Doctrine 1.2 is a PHP (5.2.3+) ORM. While Doctrine 2.0 uses the Data Mapper pattern, Doctrine 1.2 uses the Active Record pattern.

Doctrine 1.2 is a PHP (PHP 5.2.3+) ORM. While Doctrine 2.0 uses the Data Mapper pattern, Doctrine 2.0 uses the Active Record pattern. The Doctrine project is a collection open source libraries and tools for dealing with database abstraction and Object-Relational Mapping written in PHP.

Useful links

388 questions
0
votes
1 answer

Doctrine 1.2 Nested Set is Really slow. How can I improve it.(NestedSet)

I perform a simple query with Doctrine 1.2. Here is the query. $cat = Doctrine_Core::getTable('Model_Category')->find($CatID); if( isset($cat) && $cat->getNode()->hasChildren()) $this->view->CategoryTree =…
Jean-Francois
  • 1,899
  • 4
  • 35
  • 73
0
votes
1 answer

dql query builder Doctrine 1.2

Is there easier way to build querys in doctrine then this. At this point there is only one parameter, but some case there could be like username, tagname, etc. Some of those could be null or empty. I just need simple StringBuilder implementation…
user257980
  • 1,059
  • 2
  • 15
  • 31
0
votes
1 answer

Doctrine: Relating a model to itself using a link table, like "This event is related to to the following other events"

So in English, the relationship would sound like "This event is related to to the following other events". My first instinct is to create an EventEvent model, with a first_event_id field and a second_event_id field. Then I would define the following…
0
votes
1 answer

How to use innerJoin with doctrine1.2?

I have some code (works): $q = Doctrine_Query::create() ->from('UsersProjects up') ->innerJoin('up.Users u'); Two questions: Could sombody show me an example, how to join next table (more then one)? Doctrine's documentation contains only…
peter
  • 71
  • 1
  • 5
0
votes
2 answers

How to use doctrine or symfony pager with different column selected from multiple table?

How can I implement pagination using Doctrine_Pager or sfDoctrinePager while my query selects multiple columns from two or more tables ? Edit1: Ok, now I figured out that it can be done how Nathan has described below! I got confused as I couldn't…
med
  • 369
  • 1
  • 4
  • 18
0
votes
1 answer

doctrine 1.2.3 service for model

I have been using Codeigniter with Doctrine 1.2.3 and I am wondering is it possible to use own kind of service classes(like in java ee with hibernate). And how to make those right etc? Like this: class FeedbacktypeService { public function…
user257980
  • 1,059
  • 2
  • 15
  • 31
0
votes
2 answers

How to drop and rebuild tables from models without losing data using Doctrine?

I use the following code to build my tables from my models: Doctrine::createTablesFromModels(); I'm just starting out on a new project and it is the first time I've used Doctrine in an application. So far, since I'm just getting started and don't…
TaylorOtwell
  • 7,177
  • 7
  • 32
  • 42
0
votes
2 answers

Doctrine: How can I have a where clause included only when necessary in a query?

I want to use a single query to retrieve: items of any categories (no filter applied); only items of a single category (limited to a particular category); For that purpose I should be able to write a Doctrine query which would include a where…
developer10
  • 1,450
  • 2
  • 15
  • 31
0
votes
1 answer

What is the correct way to retrieve information from two tables using doctrine ORM

I am trying to perform a simple join on two tables and am having trouble finding the right syntax to use - I know i am missing something simple. From the 'users' table i need the id (working fine) and from the 'meta' table i need the last_name (not…
calumbrodie
  • 4,722
  • 5
  • 35
  • 63
0
votes
3 answers

Doctrine Self Referencing is not working in Symfony 1.4 when updating or deleting

I'm trying to build a model for content pages on my site, and i gave it a self reference named 'Related Page'. Now if i build my models and try to create a new page in the admin generator everything works fine. If i give the page a related page (or…
Adam Arold
  • 29,285
  • 22
  • 112
  • 207
0
votes
1 answer

Doctrine many-to-many relations with extra field

I want to join 3 table, Szamla, Termek and Vasarlo. This is my schema: options: collate: utf8_unicode_ci charset: utf8 Szamla: actAs: [Timestampable] columns: datum: type: timestamp notnull: true total: type:…
turbod
  • 1,988
  • 2
  • 17
  • 31
0
votes
1 answer

Doctrine CLI: Register new custom task

I am using Doctrine 1.2 & ZF 1.10. I have my Doctrine CLI setup fine to do the default tasks. But I have created a couple classes I would like to be able to execute from the command line. How would I setup my application.ini or doctrine.php to…
Nathan
  • 2,941
  • 6
  • 49
  • 80
0
votes
1 answer

Symfony 1.4 order a widgets data

I have a sfWidgetFormDoctrineChoiceMany widget, I was wondering if there was a way to order the data inside it in ascending order 'locations_list' => new sfWidgetFormDoctrineChoiceMany(array('model' => 'Location')),
seus
  • 568
  • 9
  • 31
0
votes
1 answer

Creating a Doctrine behavior: How to access actAs() params from within a listener object

I'm creating a behavior (one template and one listener). In the template class, I'm using the addListener() method to attach the listener to the model. // Inside the template's setTableDefinition() method $this->addListener(new…
mattalxndr
  • 9,143
  • 8
  • 56
  • 87
0
votes
1 answer

Unexpected doctrine validation error about length when setting the field null

I have a field that is defined as follows: class Subcategory extends BaseSubcategory {} abstract class BaseSubcategory extends Doctrine_Record { public function setTableDefinition() { // ... …
mattalxndr
  • 9,143
  • 8
  • 56
  • 87