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 saving a row not giving back saved property

I am finding problem in getting the saved property after new insertion in model. Model : setTableName('teacher'); …
Amritpal singh
  • 855
  • 5
  • 12
  • 27
0
votes
4 answers

Join and multiple and conditions

I have users table ID NAME 1 John 2 Mike 3 Jack and table with attributes and user IDs USER ATTRIBUTE 1 1 1 2 2 4 I need to select all users with attribute 1 AND 2 (so, in this example user #1 John). Attributes…
poh
  • 171
  • 9
0
votes
1 answer

How to insert multiple records in symfony 1.4?

I try to insert 1 000 - 30 000 records in one http request. And I cannot manage with this. My codes: foreach ($recipients as $recipient) { $notificationHubAction = new NotificationHubAction(); …
latata
  • 1,703
  • 5
  • 27
  • 57
0
votes
1 answer

Doctrine alter table causes auto_increment resequencing

I'm trying to execute the update schema command on doctrine, but the operation is not completed because the follow error: Command executed: php doctrine orm:schema-tool:update --force Error: SQLSTATE[23000]: Integrity constraint violation: 1062…
mayconfsbrito
  • 2,085
  • 4
  • 26
  • 45
0
votes
1 answer

proper way of calling actions from templates

I'm working on an old project and I need to add modules.I want to display some data in my templates.. In my model,I tried public function getOverdues() { $q = Doctrine_Query::create() ->select('a.firstname,a.lastname') ->from('Applicants…
user2338925
0
votes
0 answers

Php, Symfony 1.4,doctrine

I want to convert this mysql syntax into a doctrine 1.2 syntax. I want to show dates with zero values and print some errors on it. Also, is PHP foreach loop relevant for this for the templates/views? SELECT calendar.datefield AS DATE, …
user2338925
0
votes
1 answer

Doctrine 1 allowing SQL Injection?

I found this code on a legacy app: $salt = $this->generateSalt(); $new_pass_update = Doctrine_Query::create() ->update('User') ->set('password', '"'. $this->hash($newPass, $salt) .'"') ->set('salt', "sleep(10)") // $salt) <- I replaced…
Sebastián Grignoli
  • 32,444
  • 17
  • 71
  • 86
0
votes
1 answer

addAction,editAction zend framework2 doctrine2

I am using zendframework 2 and doctrine 2. My addAction doesn't work i don't have any error but when i valid my form no row created in my database !! i think that i have problem in populating foreign key ! this is my Form:
0
votes
1 answer

doctrine 1.2 with zend 2 class base not found

I integrated Doctrine 1.2 with Zend 2 and generate the models like : - models - generated BaseFamille.php Famille.php here's the code that I included in global.php…
Mimouni
  • 3,564
  • 3
  • 28
  • 37
0
votes
1 answer

Memory leak in symfony task

I have issues with symfony 1.4 a task running daily. To make simple the task download an xml then read it. I have notice that the memory used increase between each "node" in the xml. For instance, somewhere in the script I do that: …
kind-mug
  • 77
  • 1
  • 8
0
votes
1 answer

Doctrine1 is removing parentheses around multiple OR conditions

I have a query that filters a list of products by a price similarity like this: $query->andWhere( '( (i.price > ? AND i.price < ?) OR (i.salePrice > ? AND i.salePrice < ?) )', array( $item->price*0.8, $item->price*1.5, …
firedev
  • 20,898
  • 20
  • 64
  • 94
0
votes
1 answer

Confusion with Doctrine update. (1.2.4)

In my unit tests (on symfony 1.4), I was naively trying to edit a record to make my tests. However, I found out after some bug hunt that my script was not doing what I expected it to do. Here is the offending part: $tp_vehicle =…
mika
  • 1,971
  • 3
  • 18
  • 32
0
votes
1 answer

Adding property by hand to Base model in Symfony1.4 and Doctrine

I have added a new field to my table Empresa so I need to change my model. For not regenerate the whole things meaning model-forms-filters I decide to add it by hand (manually) so I'm trying to add a the property to BaseSdrivingEmpresa.class.php as…
Reynier
  • 2,420
  • 11
  • 51
  • 91
0
votes
1 answer

User authentication across client user

My Application in zend framework, symfony,doctrine. In my web Application have multiple clients which have it's their entities like product and product related to other entities. Below is my problem : User Table(clients) : id Name…
0
votes
1 answer

Does versionable behaviour impact query speed in Doctrine 1.2.4?

I am seeing odd behaviour with using Doctrine::getTable() and running queries using it. In some cases there is little to no overhead and in othercases there is 200+ms of overhead when the Doctrine::getTable() is first called (although little…
Simon Cast
  • 255
  • 1
  • 9