Questions tagged [propel2]

Propel2 is the next major version of an open-source Object-Relational Mapping (ORM) for PHP5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data.

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

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:

68 questions
0
votes
1 answer

Propel, selecting just one column

I am trying to run a query in propel that runs an aggregate function (SUM). My Code $itemQuery = SomeEntity::Create(); $itemQuery->withColumn('SUM(SomeColumn)', someColumn) ->groupBy(SomeForeignKey); Problem It should theoretically return…
captainspi
  • 445
  • 2
  • 15
0
votes
2 answers

Using column names when generating JSON in Propel

When using toJSON() on an ObjectCollection the names of the properties are always based on the PHP-names. For instance: For the column type_name the JSON property becomes TypeName, etc. Is there a way to make Propel use the name of the field/column…
Cethy
  • 551
  • 6
  • 18
0
votes
1 answer

Can't rename array fields to FIELDNAME type on paginated results

Only one thing I need is to rename all result fields from PHPNAME type into FIELDNAME. I'm running such query: $members = MemberQuery::create()->filterByOrganizerId($organizerId) ->setFormatter($formatter) ->useTableOneQuery() …
Grokking
  • 665
  • 8
  • 16
0
votes
1 answer

how to install and run propel2 in windows with wamp or ampps

I would like to use propel 2, using the .zip file in windows but I can't make it work according the docs1 (I use wamp and ampps, different servers) so I unzipped the file inside my WWW folder in my (wamp) server I try to call…
camilo
  • 25
  • 5
0
votes
1 answer

Propel ORM - Using setByName on a column from a delegated table

I'm using Propel ORM to make things easier in loading and saving a pretty large form to a database. The form is huge but it's pretty much flat data, so it's essentially one big table (lets call it persons) with a couple hundred columns. I don't…
zeke
  • 3,603
  • 2
  • 26
  • 41
0
votes
2 answers

Many to Many Relationship with extra field and 4th table foreign key with Mysql and Propel

I am designing a database that will keep track of users and their relationship with different organizations. A user can belong to many organizations, and an organization can have many users. That part is simple to solve with a Many to Many…
ryanmc
  • 764
  • 2
  • 9
  • 21
0
votes
1 answer

FatalErrorException in PropelBundle.php line 29: Compile Error: Propel\PropelBundle\PropelBundle::boot(): Failed opening required

Im trying to use propel ORM with sympfony v-2.7 In my composer I've added this line "propel/propel-bundle": "^1.4", and installed this package successfully. Then I load the Bundle into my karnel using this $bundles = array( new…
Asfaq Tamim
  • 5,677
  • 5
  • 22
  • 29
-1
votes
1 answer

PHP & MySQL - SQLSTATE[HY000] [2003] Can't connect to MySQL server - Many Connections over TCP

I have many PHP-Instances (250 to 500 and more), which open a DB-Connection and do SELECT's, UPDATE's and INSERT's. After few seconds i get the following Error: PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2003]…
1 2 3 4
5