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
2
votes
3 answers

PHP/MySQL and Doctrine Best Practices for Multi-Insert

StackOverflow answered a lot of questions before, but i'm looking for a more specific one that I couldn't find an exact answer. I'm currently using PHP/MySQL with Doctrine 1.2.2 looking forward to improve my script. It actually adds about 300…
guiligan
  • 369
  • 4
  • 17
2
votes
1 answer

Symfony - register system - confirm password and hidden input

I use Doctrine: User: columns: username: { type: string(255), unique: true } password: { type: string(255) } ip: { type: string(255) } This generated me new form: username: password: ip: How can i make…
2
votes
1 answer

Doctrine auto-truncate values on insert

I'm working on a script that reads XML from a third party partner and places the data in a database table. I have no control over the length or quality of the content. I want to avoid adding logic to inspect the length of every field. For example:…
atodd
  • 321
  • 3
  • 10
2
votes
1 answer

symfony 1.4 doctrine 1.2 - create userfriendly query/update

I have table in mysql: id | num1 | num2| num 3| num3| num5| 1 | 6 | 3 | 4 | 2 | 1 | in sql I do for example: $num = num2; $val = 2; $id = 2; $sql = "update TABLE set '$num'='$val' where id='$id'"; mysql_query( $sql); I can do with…
clausix95
  • 51
  • 2
  • 5
2
votes
1 answer

Traverse Doctrine NestedSet structure without querying

I usually fetch NestedSet tree like this: class ModelTable extends Doctrine_Table { /** * Gets tree elements in one query */ public function getMenuTree() { $q = $this->createQuery('p') ->orderBy('p.root_id') …
Dziamid
  • 11,225
  • 12
  • 69
  • 104
2
votes
1 answer

properties of a n:m relation in doctrine

Hy guys I've got the following schema for my objects: Product: columns: name: { type: string(255) } Basket: columns: current_status: { type: integer } relations: Products: { class: Product, refClass: BasketProducts,…
Flask
  • 4,966
  • 1
  • 20
  • 39
2
votes
3 answers

My doctrine is Really Slow. Simple query and one second to get the result

Here is my setup: Windows Server 2008 R2 MySql 5.1.562 Php 5.3.2 Doctrine 1.2 Anybody have an Idea why my query is taking about one second to perform a simple query. echo date("Y-m-d H:i:s", time()) ."::::::" . microtime(true)."
"; …
Jean-Francois
  • 1,899
  • 4
  • 35
  • 73
2
votes
1 answer

PHP Doctrine 1.2 Using Nested Set , how moving a node in different situation

I use nested set with doctrine 1.2. Here is my example. I got this tree Category 1 Category 1.1 Category 1.2 Category 1.3 Category 1.4 Category 2 Category 2.1 Category 2.1.1 Category 2.1.2 Category 2.1.3 Situation 1…
Jean-Francois
  • 1,899
  • 4
  • 35
  • 73
2
votes
1 answer

Symfony 1.4 (Doctrine) admin generator: How to call symfony 1.4 admin generated filter options via a url

I have an admin-generated frontend that has lots of filter options available. Can I call the page via a URL and choose different filter options per URL? eg. URL 1 = /clients/filters=caseworker_id=2 URL 2 = /clients/filters=isActive=true I used…
2
votes
1 answer

Query with doctrine 1

I try to make the following sql query from phpMyAdmin who works perfectly and return 1 result with doctrine 1 but i get an exception : SQLSTATE[42S22]: Column not found: 1054 Champ 'MOY1100' inconnu dans where clause. Failing Query: "select id_au…
Mathieu Mourareau
  • 1,140
  • 2
  • 23
  • 47
2
votes
1 answer

Doctrine 1.2 query with array bind

I have this code: $query = Doctrine_Query::create() ->select('*') ->from('attendanceRecord a') ->where("employeeId IN (?)", implode(",", $employeeId)); $employeeId is an array of numbers The sql output was: Select * from…
iscom
  • 25
  • 5
2
votes
1 answer

Add additional column to many-to-many join table in Doctrine 1

I set up an many to many relationship between Orders and Sets. An Order can contain many Sets and different Sets can belong to different Orders. Because you can set the amount for a set in a order there should be an additional column for amount. So…
spierala
  • 2,349
  • 3
  • 25
  • 50
2
votes
1 answer

Zend_Form / Doctrine_Form equivalent in Ruby on Rails 3

Hey guys, I'm coming from a Zend Framework background, are there any auto form generation tools for models in rails (eg. equivalent to Zend_Form)? For example, in ZF+Doctrine I can do and it will generate the form…
balupton
  • 47,113
  • 32
  • 131
  • 182
2
votes
1 answer

Subqueries in Doctrine for Having field

I am dealing with several bus routes. I want to fetch the two points closest to my departure and destination points. So what I do is : $q = Doctrine_query::create() ->select('r.*') //d1 and d2 are the distance between the p1 and p2 points…
Julien
  • 9,312
  • 10
  • 63
  • 86
2
votes
1 answer

Doctrine 1.2: Using postDelete to delete related files on filesystem -- with transaction support

This question is a sort of extension to this question: Perform some cleanup when deleting a record in Symfony/Doctrine I'm doing this and it's working fine, except for one problem: if the delete fails and the transaction is never committed, the…
mattalxndr
  • 9,143
  • 8
  • 56
  • 87