Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Dec 03 01:46
    oojacoboo opened #1528
  • Dec 02 23:10
    oojacoboo commented #1521
  • Nov 30 06:56
    tbhaxor closed #1527
  • Nov 29 06:29
    tbhaxor opened #1527
  • Nov 26 20:09
    tbhaxor closed #1076
  • Nov 26 11:17
    tbhaxor commented #1076
  • Nov 26 09:16
    tbhaxor commented #1076
  • Nov 26 09:06
    DavidGoodwin commented #1076
  • Nov 26 09:00
    tbhaxor opened #1076
  • Nov 22 14:59
    mpetrovich closed #1055
  • Nov 15 00:26
    crossan007 opened #1526
  • Nov 14 21:00
    JasperTey opened #1525
  • Nov 08 17:30
    GBeushausen commented #1524
  • Nov 08 13:45
    marcj closed #1524
  • Nov 08 13:45
    marcj commented #1524
  • Nov 08 13:12

    marcj on master

    Delete FUNDING.yml (compare)

  • Nov 08 03:49
    GBeushausen edited #1524
  • Nov 08 03:44
    GBeushausen opened #1524
  • Nov 08 03:04
    GBeushausen opened #1523
  • Nov 06 13:03
    dereuromark edited #1522
Srecko Skocilic
as far as I have seen, definition of index requires index-column definition, which is not the case here
The codebase for Propel2 does not mention 'gist', so it is probably not supported.
Marc J. Schmidt
No, not supported. You should write that migration file manually and skip that index from being generated by using skipSql attribute.
Srecko Skocilic
Thanks, how the skipSql attribute is used?
It seems that I have to set skipSql for the entire table, and in this case I only want this index to be ignored.
Srecko Skocilic
Also, not working, I have made a migration which created this index, but propel:diff still argues about DDL generation even with skipSql="true" added to address table :(
There are some bugs like this. My generated migrations still think that a decimal field needs to be modified. The actual generated query has no effect, so it is inconsequential noise. Maybe yours falls in that category also.
Srecko Skocilic
But in the direction of clean coding, I don't have clean state mapped to xml definitions of our database schema :(
It is dirty. That's what happens when you make a solution that works, as opposed to one that is perfect.
  • Me, September of last year, this chat room.
Srecko Skocilic
I see what you mean, but in the aspect of clean code we must provide, obligations and contracts, this solution is not acceptable by all means. :(
Sometimes that does turn out to be the case.
Marc J. Schmidt
Jupp, not perfect since its a complex topic only very few people on earth want to spend free time on. I'm afraid there is no better solution right now
Jeramy Rutley
PHP n00b here. I can't even run a basic query on an existing database after an install. There's a giant leap between installing and "propel init" (which were both easy) and actually running my query.
For example, this
include "vendor/autoload.php";
include "linkaudit/linkaudit/Base/UploadedLinks.php";
include "linkaudit/linkaudit/Base/UploadedLinksQuery.php";
include "linkaudit/linkaudit/UploadedLinks.php";
include "linkaudit/linkaudit/UploadedLinksQuery.php";
use Propel\Runtime\Propel;
use linkaudit\linkaudit\UploadedLinksQuery;

$myAudit = new UploadedLinksQuery();
$rows = $myAudit
foreach($rows as $row) {
  echo $row;
"Fatal error: Uncaught exception 'Propel\Runtime\Map\Exception\TableNotFoundException' with message 'Cannot fetch TableMap for undefined table phpName: \linkaudit\linkaudit\UploadedLinks.' in /var/www/html/vendor/propel/propel/src/Propel/Runtime/Map/DatabaseMap.php:209 Stack trace: #0 /var/www/html/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/BaseModelCriteria.php(144): Propel\Runtime\Map\DatabaseMap->getTableByPhpName('linkaudit\linka...') #1 /var/www/html/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/BaseModelCriteria.php(40): Propel\Runtime\ActiveQuery\BaseModelCriteria->setModelName('\linkaudit\link...') #2 /var/www/html/linkaudit/linkaudit/Base/UploadedLinksQuery.php(102): Propel\Runtime\ActiveQuery\BaseModelCriteria->construct('default', '\linkaudit\link...', NULL) #3 /var/www/html/index.php(10): linkaudit\linkaudit\Base\UploadedLinksQuery->construct() #4 {main} thrown in /var/www/html/vendor/propel/propel/src/Propel/Runtime/Map/DatabaseMap.php on line 209"
In the docs it just says "/ initialize Propel, etc. /" but that's the part I don't know what to do
Marc J. Schmidt
just "require" the config.php that was generated by propels config command
Jeramy Rutley
ok will try thanks
Jeramy Rutley
I assume you meant generated-conf/config.php? I added "require generated-conf/config.php" after the autoload line with the same result
when generating the db, I wrote "linkaudit" as the namespace, so I'm a bit confused why it outputs "linkaudit\linkaudit"
Jeramy Rutley
so after a while I nuked the project and recreated using the "hard" method and discovered enough in there to get me going, with the exception that my customer is using PHP 5.6.x and it failed because of Symfony 4. Forcing it to version 3.4 got me going
@jrutley I would name the namespace as vendorName\projectName....
Example: \jrutley\linkaudit....
Hello, any new upcoming feature or update on propelorm? It seems this project has stopped from last year.
Hey guys, I wasted 5 years of life on developing my private project, which only dependency was Propel ORM ()unfortunately DB first, which makes it even worse for migration to doctrine). I beg you for some information on if there is any hope for further development of propel 3. There is really a lot of source code to rewrite, if propel is not maintained anymore. If there is no hope for continuing project with current ORM, I would be really glad to have some info on best approach to rewrite my propel code to another ORM.
Marc J. Schmidt
Hi, there is basically no hope Propel 3 will ever be released. Contribution is dying, usage is declining, financial costs increasing, PHP is dying and for more and more people not worth investing their time into it except when they are full-time php devs and use that project in some projects. Also sponsoring PHP stuff is declining as well, almost nobody wants to financially support the development of big php projects, and the investment of a PHP dev into open-source does not return financially back that much anymore. So, Propel is slowly dying as many other PHP projects, and I'm afraid, while looking at the alternatives that are more lucrative for businesses, that will never change. So, take your code, convert to PHP's last standing giants like Doctrine, or switch to better alternatives like typescript&typeorm.
Thanks for honesty, I am sorry to hear that.Thank you for great job, for me Propel was the best PHP ORM, leaving all the rest behing.
Thanks a lot for years of great work.
Marc J. Schmidt
you're welcome!

Good Morning,

Is there anyone who can tell me why Propel sometimes returns an object of one of its generated classes from a query... and other times returns an array?
I can't seem to find any consistancy myself for why it sometimes chooses one way, and other times chooses another.

Marc J. Schmidt
Please post the code in question
return ScenarioPermissionsQuery::create()
This returns an array, rather than an ScenarioPermissions object.
return ScenarioPermissionsQuery::create()
But this returns a ScenarioPermissions object
(I use toArray() on it to change the return into an array. but without that call... its an object)
Marc J. Schmidt
A plain array? That's not possible, findOne has no code to return an Array. You might have overritten something
I haven't modified any of the propel code.
Marc J. Schmidt
it also doesnt make sense for toArray() to not return an array but an entity object. I guess there is some code that confuses them. Try to put the critical parts in a reproduceable git repo, then we can try to help
I dont mean propel code, but maybe code in query classes
does your permissions object have only ine column, or an array column?

Yeah that's what I mean, I havent modified the query classes.

No it has 3 columns: id, scenarioName, connectionName.

Unfortunately putting the code in a reproducible manner into a repo isn't possible.
It's fine. I just wanted to know if it was intended behaviour or not. Since it's not I'll just work around it.
not much else I can do. Thanks for the help.
Urs Hofer
trying to do something like this with propel, having a very hard time... Is there a documentation for sub selects somwhere?
    SELECT   *  FROM _contributions as c   
            c._name = 'BLABLA'
            AND c.id IN (SELECT d._forcontribution FROM _data as d WHERE
                (d._fortemplatefield = 11 AND d._content LIKE '%3%')
                OR (d._fortemplatefield = 13 AND d._content LIKE '%5%')
                OR (d._fortemplatefield = 15 AND d._content LIKE '%7%')
                OR (d._fortemplatefield = 18 AND d._content LIKE '%4%')
                OR (d._fortemplatefield = 19 AND d._content LIKE '%1445%')
Urs Hofer
…hm, okay, probably doing sthing like:
$q->where('_contributions.id IN (SELECT d._forcontribution FROM _data as d WHERE (d._fortemplatefield = ? AND d._content LIKE ?))', [15, '%3%']);

Hello, my name is Liora and I am currently hunting open source projects for company NeuraLegion (www.neuralegion.com)
We just launched a free annual subscription for open source projects for our AIAST tool NexPloit.

If you are interested, please, reach us on opensource@neuralegion.com!

Thank you for your time and consideration! If you have any questions, please do not hesitate to contact us!


New to Propel - how would I convert this SQL query into Propel syntax? SELECT COUNT(distinct User_Id) AS DistinctIDs FROM Tbl_User_Answers
In ConnectionFactory.php line 43:

  Unable to open connection  

In PdoAdapter.php line 72:

  Unable to open PDO connection  

In PdoConnection.php line 59:

  could not find driver
Hi anyone has this error when generate classes?
Jesse Quinn
hi guys, quick question, I have recently upgraded from 1.6.4 to 2, and i am trying to wrap my head around some of the changes. Normally i would use a doSelectOne($c); on a criteria, but this no longer works with v2. how can i use a criteria within a query based class?
Alberto Castillo G.
Hi, is there a way to get all TableMaps from Propel? I know \Propel::getDatabaseMap() will only load runtime (so previously loaded tables). My goal is to be able to get properties for every model, more specifically create \ReflectionClass from them.