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

Return all rows where the entire list of a relation matches (as opposed to any combination of)

With the following simple table structure: Data ---------- id Tag ---------- id TaggedData ---------- id tag_id data_id If I had a list of Tag ids, how would I fetch every row of Data where every row of Tag in my list has a relation to a row of…
Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112
0
votes
1 answer

Checking how many fields have changed upon saving a form

I am saving records in a transaction using symfony1.4 and Doctrine. The rows inserted are coming from a CSV file which is updated regularly. I have already got a method that checks if the records in the CSV match that in the DB and do not…
sipher_z
  • 1,221
  • 7
  • 25
  • 48
0
votes
1 answer

How to do postInsert in Symfony 1.4 with Doctrine?

I have a table (call it Table A) that needs to create multiple additional child records when a Table A record is created. Deleting the Table A record should delete the Table B records. Deleting the records is easy using ON DELETE CASCADE in…
Riothamus
  • 71
  • 1
  • 4
0
votes
1 answer

Doctrine: How make 'data-load' and remove index table without rebuild the DB

My question is about data-load command. When I made more data-load commands, without rebuild the tables, the ID index from the table is kept ans the first line of table don't begin with ID 1. It's possible with data-load command to insert the data…
0
votes
1 answer

Doctrine_Cache_Apc not works in symfony task

in my doctrine table i got this public function countHitsFor($object_id) { return $this->createQuery('s') ->select('COUNT(*) as count') ->where('s.target_id = ?', $object_id); ->useResultCache(true, 3600,…
fullpipe
  • 368
  • 4
  • 14
0
votes
1 answer

Symfony 1.4 embedRelation where clause

Is it possible to set a where clause on embedRelation? $this->embedRelation('treatedStones'); I need to get the treatedStones where stone_free = 0
Imran Azad
  • 1,384
  • 1
  • 21
  • 36
0
votes
1 answer

Unable to access joined table columns in Doctrine

Here is the schema of two tables that I am querying in doctrine. I have two tables in my schema called taxonomy and lesson, which have a many to one relation [should really be one to one, but that's how it has been encoded]. My query is encoded in…
user1020069
  • 1,540
  • 7
  • 24
  • 41
0
votes
1 answer

Cannot save a Doctrine_Collection

I am using Docrine 1.2 with Zend Framework and trying to save a Doctrine Collection. I am retrieving my collection from my table class with the following code. public function getAll() { return $this->createQuery('e') ->orderBy('e.order ASC,…
Garry
  • 1,455
  • 1
  • 15
  • 34
0
votes
1 answer

MySQL Query (or Doctrine 1.2 query) - get most recent item from joined table and filter

I am having trouble constructing a query to do the following: Filter contacts by activity_type_id, only displaying contacts where the most recent activity has the desired activity_type_id or is NULL (no activity) Tables are structured as follows: A…
Ben
  • 380
  • 1
  • 3
  • 14
0
votes
3 answers

Choosing between Symfony's Doctrine ORM files Model.class.php and ModelTable.class.php

when doctrine builds model files for a table, it generates three files, essentially BaseModel.class.php, Model.class.php and ModelTable.class.php. Common knowledge requires that any modifications be done to Model.class.php or ModelTable.class.php vs…
user1020069
  • 1,540
  • 7
  • 24
  • 41
0
votes
1 answer

convert into doctrine

SELECT id, forename, surname, created FROM name n WHERE created = (SELECT MAX(created) FROM name GROUP BY id HAVING id = n.id); schema.yml: id: type:…
craphunter
  • 820
  • 2
  • 15
  • 27
0
votes
1 answer

orderBy & groupBy query

My db entries id | shop_id | last_changed 1 | 1 | 7 pm 2 | 1 | 8 pm 3 | 2 | 9 pm 4 | 2 | 8 pm 5 | 3 | 5 pm My query should be that I only get entries with the id: 2, 3, 5 When I do this: $q =…
craphunter
  • 820
  • 2
  • 15
  • 27
0
votes
1 answer

Adding a Doctrine event listener to all tables in Symfony 1.4

Is there a quick way to add a Doctrine event listener to all tables in a Symfony 1.4 project? I've tried adding this to the Doctrine_Manager in ProjectConfiguration::configureDoctrine() but this doesn't seem to get called. DQL callbacks are enabled,…
Steve Browett
  • 115
  • 1
  • 5
0
votes
2 answers

Getting node ancestors using Doctrine 1.2 and Symfony 1.4

I've a little trouble while trying to get all ancestors from a node; This is my schema.yml: Constante: connection: doctrine tableName: constante actAs: NestedSet: hasManyRoots: true rootColumnName: parent_id columns: id: type: integer(8) …
Manuel Serrano
  • 100
  • 1
  • 4
  • 7
0
votes
1 answer

Doctrine 1.2 - Building a query after user search input

I have the following table (Articles, Categories, Relations) structure: articles >id >title >body cats >id >title cat_article_relations >id >cat_id >article_id Now i created a page where the user is able to select one or more categories…
Peter
  • 1
  • 1
1 2 3
25
26