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

When using Doctrine::generateYamlFromDb(), can I specify a prefix to use?

When using Doctrine::generateYamlFromDb(), can I specify a prefix to use? For example, if the table name is "user", by default, the generated class name would be "User". Can I make sure the class name (and filename) is "PrefixUser"?
mattalxndr
  • 9,143
  • 8
  • 56
  • 87
0
votes
1 answer

Can I only generate base classes when calling Doctrine::generateModelsFromYaml()?

I am using Doctrine::generateModelsFromYaml(). It creates a directory filled with base classes. Cool. I'm guessing the point of separating the base classes is to store only column definitions and relationships (in other words, only things that can…
mattalxndr
  • 9,143
  • 8
  • 56
  • 87
0
votes
1 answer

Doctrine 1.2 query with utf8 column name

I have this same problem, but with Doctrine 1.2 instead of Doctrine 2.0. I have a column with non-Ascii character in his name, and Doctrine give me this error when I try to select it : Message: SQLSTATE[42000]: Syntax error or access violation:…
Matthieu
  • 563
  • 1
  • 7
  • 25
0
votes
0 answers

Force index in Doctrine 1.2

I want to use Force index in Doctrine query as like in following mysql query: SELECT * FROM table_one USE INDEX(`force_index_name`); How will I use it in doctrine query like in Doctrine_Core::getTable('table_one)->createQuery()->execute();
Irfanullah
  • 217
  • 2
  • 4
0
votes
1 answer

Doctrine create subquery with bound params

I am trying to construct a query that will basically pull all entries whose id's have 2 particular entries in another table so I am trying the below: $query = $this->createQuery('e'); $subquery1 = $query->createSubquery('sea') …
mixkat
  • 3,883
  • 10
  • 40
  • 58
0
votes
0 answers

Redirect after save Doctrine 1.2 Symfony 1.4

i want to redirect the action "new" to action "edit" passing the id generated. I take the url very well but the page don't go to redirection, and stay on same page. This is my code: if ($form->isValid()) { $form->save(); $id =…
0
votes
1 answer

Relation can not contain other values than in array

I'm struggling with something and I hope you can help me out a bit. Let's say I have two tables: class and student. One class has many students and a student has only one class. I am allowed to manage certain students, spread out over different…
LaVomit
  • 492
  • 5
  • 15
0
votes
1 answer

Get Doctrine Relationships in DQL

I have three tables: Project: ... relations: User: local: authorId foreign: id Users: class: User local: projectId foreign: userId refClass: UserProjects User: ... relations: Projects: …
dragonmantank
  • 15,243
  • 20
  • 84
  • 92
0
votes
1 answer

update in Doctrine with special characters

I have this error when i try to update my value with special character Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the…
Ahmed Ziani
  • 1,206
  • 3
  • 14
  • 26
0
votes
1 answer

how to select a id or a value that is common to multiple values in a column

this is my problem book student_id 1 1 2 2 3 3 1 2 in this case i want book 1 since it is common to the combination of student 1 and 2(the number of students to match may change) how can in get the book that is common to two or…
lk404
  • 179
  • 4
  • 18
0
votes
1 answer

what is going to be the output of a doctrine 1.2 join

how can i proceed with the resulting object after a left join what kind of a object do i get $q = Doctrine_Query::create() ->from('Student s') ->leftJoin('s.Book b') …
lk404
  • 179
  • 4
  • 18
0
votes
1 answer

Convert SQL query to Doctrine 1.2 dql

I have a select query in Mysql table to fetch related table with a duplicate values in a specific column(date).This will successfully display columns and its foreign keys if it has duplicate values in a column.Example two rows same value of…
user2338925
0
votes
1 answer

Doctrine 1.2: get products where associated simple products have stock

I am struggling on how to generate the correct query with Doctrine 1.2 to retrieve my products where the associated simple_products have a total stock greater than 1 (at least one of them has a stock of 1 or more) My schema.yml: Product: columns: …
fkoessler
  • 6,932
  • 11
  • 60
  • 92
0
votes
1 answer

Using Composer to autoload Doctrine 1 in Zend Framework 2

I want to use Doctrine 1 inside a Zend Framework 2 project. And it has the old underscore/directory class naming style. If I am right that is compatible with the PSR0 autoloading. So I configured it as I thought would be correct. But it's not. :-( I…
NoradX
  • 53
  • 1
  • 1
  • 6
0
votes
0 answers

Doctrine+symfony yml: fixture value is 0 but loaded in MySQL as NULL

So I have a schema.yml like this: Product: tableName: product columns: count: type: decimal(15,5) default: null notnull: false And my initial_data.yml like this: Product_724d2a29-8c41-11e2-b0e4-080027706aa2: count:…
capsula
  • 498
  • 1
  • 7
  • 21