Questions tagged [propel]

Propel is an open-source object-relational mapping (ORM) for PHP 5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data. There are two major versions, 1 and 2.

Propel is an open-source object-relational mapping (ORM) for PHP 5.

It allows you to access the records in your database using a set of OOP objects, providing a simple API for basic CRUD operations. To accomplish this, Propel ORM includes a generator component which uses source code generation to build PHP classes based on a data model definition written in XML (or reverse-engineered from an existing database).

Propel also includes a runtime component which manages connections, transactions, and any idiosyncratic rules that describe the workings of the RDBMS being used with Propel.

In addition to being open source, the code as implemented in a project is extendable with behaviors which alter the generated class structure and by working with the one-time generated model classes themselves which extend the base Active Record classes.

It is also an integral part of the PHP framework Symfony and was the default ORM up to and including version 1.2.


Documentation:

1161 questions
0
votes
2 answers

Optimizing propel data insertion for a very long data file

I'm reading a very long text file where each line is composed of an ID, groupID, and additional data. Each ID can be associated with many groupIDs (lines 1,2,3), and each ID-groupID combo can be associated with many data (lines 2,3). JWOFJ903JCKDF8O…
sameold
  • 18,400
  • 21
  • 63
  • 87
0
votes
1 answer

How to create custom SQL Propel Task for Symfony Task?

I want to insert data into a Table with a for-loop. First of all I have create a Symfony Task with: symfony generate:task namespace:MyTask now I'm trying to generate a propel sql task that I can call into my Symfony Task so that when I call :…
3logy
  • 2,634
  • 8
  • 46
  • 99
0
votes
1 answer

Is there a way to ignore existing tables when using Propel?

I am using Propel for PHP and I want to create a diff task to create new tables. The issue is this is inside an existing database with tables already existing. I don't want these tables to be managed by Propel. When doing the diff task, it looks…
Taylor Dondich
  • 628
  • 4
  • 9
0
votes
1 answer

How to remove automatically inserted Queries from Propel(Symfony)?

I'm writing some Database queries with Propel(symfony), but propel always add some query! For example : SELECT COUNT(*) FROM table WHERE (table.start>='2012-06-01 00:00:00' AND table.end<='2012-06-30 00:00:00') AND table.deleteat IS NOT NULL The…
3logy
  • 2,634
  • 8
  • 46
  • 99
0
votes
2 answers

Propel 1.6 Formatter

Is there any way I can set a formatter on models that will convert negative numbers to positive numbers for all numeric fields in the model? I started out by trying to make a propel formatter but I'm not sure what code should go in format and…
Chris McKnight
  • 8,540
  • 4
  • 29
  • 31
0
votes
1 answer

How to Modify a column of a table with Propel Migration and Symfony

I've got a huge problem with a propel migration in a symfony project. For the very first time, I tried to alter a column of table, but I always got the following error on CLI: $ php symfony propel:up >> propel Executing migration…
derphil
  • 385
  • 6
  • 25
0
votes
2 answers

Propel Saving: naming convention

I am having troubles with the casing of variables in Propel Current code that works: $this->_variables = array('Alias' => 'aliasOne', 'LocationId' => 1); $model = new Client(); $model->fromArray($this->_variables); $model->save(); However due to…
azz0r
  • 3,283
  • 7
  • 42
  • 85
0
votes
1 answer

Propel_Generator - include paths in the classmap-file incorrect

i am using the propel runtime v1.5.4 and its related propel_generator in my zend_framework/php project since two years without any problems. Yesterday i have updated the propel_generator via pear to v1.6.5 and the runtime library to v1.6.6. After…
0
votes
2 answers

what does _model stand for in symfony/propel?

I change schema.yml from time to time and execute: symfony propel:build-all-load but the lib/_model and lb/model do not reflect my changes and cause: Call to undefined method
akiva
  • 2,677
  • 3
  • 31
  • 40
0
votes
1 answer

Symfony "cannot fetch TableMap" error when using propel:build-all

Cannot fetch TableMap for undefined table: order_product. Make sure you have the static MapBuilder registration code after your peer stub class definition. Even if I erase the entire schema, clear the cache, and delete everything but "vendor" in…
James Skidmore
  • 49,340
  • 32
  • 108
  • 136
0
votes
0 answers

Why is sfPropelORM breaking my form filter criteria?

I was using the sfPropel15Plugin with Symfony 1.3.11, and everything was working great. I decided to upgrade the plugin to the sfPropelORMPlugin, which uses Propel 1.6. I did the normal steps to install the plugin. I was able to get the app back up…
Geoff Maddock
  • 1,700
  • 3
  • 26
  • 47
0
votes
0 answers

Symfony2 Security Component And Propel, Incorrect table name in the select statement

I read this page for manage my symfony2.0 login form with propel orm. On form submit propel returns this error: Warning! Unable to execute SELECT statement [SELECT admin.ID, admin.USERNAME, admin.PASSWORD, admin.USERLEVEL, admin.MERCATO_ID FROM ``…
originof
  • 795
  • 1
  • 7
  • 24
0
votes
1 answer

Propel - propel:build-sql - Ability to add CREATE DATABASE .. IF NOT EXISTS

I'm customizing a phpUnderControl build file to use the symfony propel:build-sql functionality to generate .sql files to be loaded for every build (not every test). What I am running into is that the resulting .sql files expect the databases to…
Mike Purcell
  • 19,847
  • 10
  • 52
  • 89
0
votes
1 answer

Unable to execute insert statement while saving in symfony (propel) form with map list

In doSave() function in form I'm trying to save article category (which it is a node in a tree), and then assign to this category articles (many to many relationship). I'm getting an error while in $this->saveWaArticleNewsCategoryMapList($con);…
winnfield
  • 273
  • 4
  • 19
0
votes
1 answer

Many to many relation on same table

I've got a little problem with many to many relations on the same table using Symfony 1.4 with the Propel ORM. My schema.yml looks like this: propel: item: _attributes: { phpName: Item } id: { phpName: Id, type: INTEGER, size: '10',…
Bob Van de Vijver
  • 2,224
  • 2
  • 14
  • 11