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

how to make left join between two tables without relation in doctrine 1.2

I have two tables. Table invitations Columns: id email created_at Table orders Columns: id amount email created_at i need to create a DQL to select all the fields from invitations table and left…
0
votes
1 answer

Doctrine INNER/LEFT JOIN two tables

I am learning from this Question but facing issues with many operations in between: doctrine 2 query builder and join tables Below is my Questions. I am looking for help in my previous question too.. Thanks for those who helped me in solving the…
DonOfDen
  • 3,968
  • 11
  • 62
  • 112
0
votes
0 answers

How to add "o.idempresa" to the DQL query?

I'm trying to build this query: SELECT re . *, t.tipo, m.patente, o.nombre, de.revisado FROM sdriving_registros_emisores re LEFT JOIN sdriving_turno t ON re.idturno = t.idturno LEFT JOIN sdriving_maquina_emisor me ON…
Reynier
  • 2,420
  • 11
  • 51
  • 91
0
votes
1 answer

Doctrine 1.2: how to get the count of related table rows ina a query?

I have a table of users, plus a related table called UserWorkplaces, where one user could have any number of related rows on the UserWorkplaces table. I'm trying to build a query to find all of the users with only one related row in UserWorkplaces.…
blainarmstrong
  • 1,040
  • 1
  • 13
  • 33
0
votes
1 answer

how i can use union and union all in Doctrine1.2

SELECT avg(mw) as av FROM meter_reading WHERE hierarchy_id in(1,2) and union all SELECT avg(elec) as av FROM meter_reading WHERE hierarchy_id in(1,2) (Example)
Sanjay M
  • 1
  • 1
0
votes
1 answer

Doctrine update php models according to db

I need to maintain a symfony 1.4 app , the app uses doctrine (1.2 I guess). The problem is that people modified the databse without using doctrine. To fix this i tried to update the doctrine models this way: symfony doctrine:build-schema symfony…
maazza
  • 7,016
  • 15
  • 63
  • 96
0
votes
1 answer

Strange behaviour with Doctrine_Query in Doctrine 1.2

I have a query that has multiple orWhere statements. The PHP code looks like this: $firstDay = $params['datetimeForMonth']->format('Y-m-d'); $lastDay = $params['datetimeForMonth']->format('Y-m-t 23:59:59'); $whereStatement = "(s.level = ? AND…
blainarmstrong
  • 1,040
  • 1
  • 13
  • 33
0
votes
1 answer

how can I make symfony see my new relations between tables?

I am using symfony 1.4 for a project (already started), now I am changing some stuffs and I get an error of relations when I query for some info between two tables, one already exist and the other one is a new one, that should have a foreign key…
jpganz18
  • 5,508
  • 17
  • 66
  • 115
0
votes
5 answers

Doctrine where not

I have a table in DB like that i want to select all except the record contain (x=1, y=1) i mean the id=8 id | x | y --------------- 1 | 2 | 1 2 | 0 | 1 3 | 5 | 6 4 | 6 | 4 5 | 7 | 4 6 | 7 | 4 7 | 5 | 7 8 | …
user1272589
  • 789
  • 1
  • 10
  • 25
0
votes
0 answers

Strange characters after inserting string from utf8_decode into a mysql table with PHP 5.3/Doctrine 1.2

I'm consuming a xml (i get it by a rest service). At one point i decode a CDATA field as: $version_doc = $this->getSimpleXml($uri); if($version_doc != false){ $equipment = utf8_decode((string)$version_doc->equipment); } This is an example…
R01010010
  • 5,670
  • 11
  • 47
  • 77
0
votes
1 answer

Get filtered related data without excluding first table rows if there's no related data in second table

Having two related tables, Car and CouponException, I wanna get all cars within an array of models and also get the CouponExceptions related to every Car, but the tricky thing comes here.. i only want to get the CouponException for that car given a…
R01010010
  • 5,670
  • 11
  • 47
  • 77
0
votes
2 answers

Doctrine multi-row groupBy count

I have the following Query with doctrine: $q = Doctrine_Query::create() ->select("q.id, q.user_id, count(ua.id) as quantity") ->from("question q") ->leftJoin("q.Answers a") ->leftJoin("a.UserAnswers ua") …
Pipe
  • 2,379
  • 2
  • 19
  • 33
0
votes
1 answer

Proxy Class for Doctrine 1.2 models

I am writing an application where I route my methods from my application to a sevice and then to the models of Doctrine. But the server of the service is not allowing more than one class to be included. So I need to write a proxy class for all my…
Sriniwas
  • 505
  • 2
  • 6
  • 21
0
votes
1 answer

How do I make doctrine do not try to update a table?

I'm working on a project where we use views to create a interface/layer between another system which is a datasource but have no matching model. This way, in my system, these views are in fact models. Everything is working perfectly fine until now,…
CesarScur
  • 84
  • 7
0
votes
1 answer

Confusion of slug with route part "new" etc

I have a sfDoctrineRouteCollection: foo: class: sfDoctrineRouteCollection options: model: Foo columns: slug action: [list, show, new, create, edit, update, delete] If someone now creates a new entity whose slug results in, for…
Flinsch
  • 4,296
  • 1
  • 20
  • 29