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

Propel2 Build Query with functions and then call Find

Few days into PHP here and I have one that has me really stumped. I am using Propel2 to retrieve rows from a database based on filters the user selects. Ultimately I am hoping to have a lot of filters the user can select, and then generate a custom…
ZoomStop
  • 13
  • 2
0
votes
1 answer

Fos User Bundle for Symfony 3.2 does not support propel datastore anymore?

I've been running Symfony 2.3 and used FOS User Bundle a lot so I reused some of my config.yml configuration in a new project with Symfony 3.2.8. I just restored FOS User Bundle via composer and I am wondering why that vendor package is lacking the…
0
votes
1 answer

/usr/bin/env: �php\r’: No such file or directory

I have a problem during Propel ORM configuration. I prepared environment on my Vagrant with PHP 7.1 following this provision file: # Install software add-apt-repository ppa:ondrej/php apt update apt install python-software-properties apt…
Dapi
  • 1
  • 2
0
votes
2 answers

PHP/Propel delete record 1:n

I've got two tables: step and links joined 1:n. I'm aiming to maintain the links through the step objects. I retrieve all steps from the database and populate the relation with the links table. I persist the step object containing a collection of…
Remco
  • 172
  • 9
0
votes
1 answer

propel orm - migration

I have this problem and I couldn't find very good informations. For those informations I have found, none is useful. Here it goes, I started a project with propel, I created a first database with a basic table in it, ran "php propel init",…
Matheus
  • 880
  • 1
  • 7
  • 13
0
votes
1 answer

PHP Propel on macOS Sierra unable to create working symlink

The manual of propel says: In order to allow an easier execution of the script, you can also add the propel generator’s bin/ directory to your PATH, or create a symlink. For example: $ cd myproject $ ln -s vendor/bin/propel propel If I do this, the…
klaasjansen
  • 537
  • 1
  • 6
  • 20
0
votes
1 answer

Propel and Collection Methods

I am developing a PHP app with Propel ORM as a model. It's installed via Composer and all classes are auto-loaded correctly. I can create querys, access database and retrieve data to populate my page. Nice. But I'm having trouble with some methods…
Mochilo
  • 301
  • 1
  • 10
0
votes
1 answer

Symfony 3.1: Could not load type model

I am trying to create a test application using symfony 3.1 and using Propel 2 and got some error Could not load type "model" Inside my Form $builder->add('province', 'model', array( 'class' => 'Test\MainBundle\Model\Province', …
0
votes
1 answer

Invalid Argument Exception , Driver [propel] not Supported in Laravel with using Propel ORM

I changed laravel default Authentication Driver eloquent to propel with the use of the instructions given in below link . https://packagist.org/packages/propel/propel-laravel auth.php 'driver' => 'propel', 'model' =>…
Madushan Perera
  • 2,568
  • 2
  • 17
  • 36
0
votes
1 answer

php - Can't update table row using propel

What i'm gonna to do is just update one row form a table and using propel i've this code : $group = GroupsQuery::create()->findOneByGroupName('A'); $group->setGroupName('B'); $group->save(); but the problem is that nothing changes on…
Armin
  • 2,397
  • 2
  • 21
  • 31
0
votes
0 answers

Invalid database name: no configured connection named

I tried to search somewhere, but haven't found any answers. Here is my problem : I'm developing a website, using Symfony 3 and Propel 2. i've got some bundle connected to my own database, it works perfectly. I've one bundle which should be connected…
0
votes
1 answer

How to make propel orm use case-sensitive names

Propel ORM fails to query on the production environment because the database it connects to has case-sensitivity enabled (linux/ubuntu). Since the db is managed by another organization, it's harder to get it fixed than to make the changes to the…
Muhammad Ali
  • 712
  • 7
  • 14
0
votes
0 answers

Create complex query on Propel

I have a table with columns(id, name, title, time), I want to get a query that gives each row a virtual number by counting row with time condition! My sql Select is this: SELECT aTbl.name, aTbl.title, ( SELECT COUNT(*) …
X.Strange
  • 175
  • 1
  • 16
0
votes
2 answers

Limit fields in result of Propel v2 query with left join

I'm using Propel ORM v2 to retrieve records from a table which is linked to records of another table using foreign key. I'd like to return only certain fields from both the parent table and the child table. What is the best way to do this? My table…
EthanS
  • 734
  • 1
  • 5
  • 8
0
votes
1 answer

Propel validation for unique key pair

In my database user_group table UNIQUE_KEY consist of two columns , user_id and user_group_id. This is how it looks like in propel schema :
Madushan Perera
  • 2,568
  • 2
  • 17
  • 36