Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 25 16:20
    dereuromark commented #1676
  • Nov 25 16:06
    WebsourceCz opened #1676
  • Nov 20 15:44
    darki666 commented #823
  • Nov 20 15:37
    jb-lesep commented #823
  • Nov 20 15:36
    jb-lesep commented #823
  • Nov 20 07:21
    nederdirk synchronize #1657
  • Nov 20 04:48
    schursin commented #1182
  • Nov 19 16:08
    nederdirk ready_for_review #1657
  • Nov 19 16:08
    nederdirk synchronize #1657
  • Nov 19 16:06
    dereuromark commented #1657
  • Nov 19 16:01
    nederdirk synchronize #1657
  • Nov 15 16:12
    DawoudIO opened #1675
  • Nov 14 15:08
    deargle commented #1080
  • Nov 14 08:43
    surekap opened #1674
  • Nov 13 13:13

    dereuromark on master

    fix identifierQuoting for Versi… Merge pull request #1665 from k… (compare)

  • Nov 13 13:13
    dereuromark closed #1665
  • Nov 13 11:20

    dereuromark on master

    Add null-typehint for nullable … Nullable related object Merge branch 'remove-dead-code'… and 1 more (compare)

  • Nov 13 11:20
    dereuromark closed #1667
  • Nov 10 09:26

    dereuromark on master

    PdoStatement::setFetchMode comp… Fix Merge pull request #1673 from p… (compare)

  • Nov 10 09:26
    dereuromark closed #1673
Federico
@pmfederico
@Nithrild Open the command file and add that to a php file, easy, also any hosting that doesn't lets you run command line is utter bullshit
But that seems to be a common rule in Germany
Switch to digital ocean
Nithrild
@Nithrild
@pmfederico Thank you for the answer. I have a question about that though. I cannot find a Command file. I don't really understand how to call the "propel diff", "propel migrate" commands from a file. Can you give me an example of how to do this?
Federico
@pmfederico
@Nithrild how do you run your migrations now?
Nithrild
@Nithrild
On my local computer, I open the console, and in the directory of my project I type the "propel diff" command. This creates the migration file, and then I run the "propel migrate" command. I want to be able to run these commands from a .php file so I can update my production database
Nithrild
@Nithrild
Thank you, @pmfederico . I was able to run the command
Federico
@pmfederico
np
J Skoba
@SpikedCola
hi all! quick question, hopefully there's an easy solution. i'm attempting to "lock out" the changing/updating of certain columns for my model. ideally this would happen in the setXXX() functions (if condition is true, return without making a change). however it looks like there's no hook in the setXXX functions, like there is for preInsert/preUpdate/etc. i tried _call and _set magic functions, but they don't seem to be triggered since the setXXX function exists. i could override each of the setXXX() functions myself, but if the db schema changes i will have to manually fix the overrides. a) does this make any sense, and b) does anyone see a way to accomplish this?
is there perhaps a way to insert code into propel's build process, so i could add my own function/hook when setXXX is generated?
J Skoba
@SpikedCola
i've overridden isColumnModified and that got me half-way there. i can prevent inserting/updating the columns of interest by returning false. however the object's value can still be changed, which could lead to confusion..
Adrian Padurean
@Securiteru_gitlab
Hey! Quick question, does any1 know if there's SQL query results caching in propel or what would be the best solution for that? Thanks.
Ryan Rentfro
@SourceCode
For caching use redis or elasticache (AWS redis) with a TTL. The best way to do that is to store the query results by hash. So if a query has been ran in the TTL window it will just pull the cache result vs going to the database itself.
Just a heads up - some symfony stuff seems to break with the latest packages of propel + symfony config/finder/filesytem - thinking its config - stackoverflow details here: https://stackoverflow.com/questions/62280493/fail-to-run-propel-command
Adrian - you can also write a behavior that can do that automatically if its a pattern you need to use all over the place.
Ryan Rentfro
@SourceCode
Rolling back the 3 packages I highlighted in Stackoverflow fixed the issues in that thread btw.
all of them back to v3.4.22
Adrian Padurean
@Securiteru_gitlab

Adrian - you can also write a behavior that can do that automatically if its a pattern you need to use all over the place.

I'm already on that path, I'm using Redis and I'm trying to integrate a new behaviour. Can you suggest a propel2 guide in order to achieve this?

Thank you for the feedback!
Ryan Rentfro
@SourceCode
http://propelorm.org/documentation/06-behaviors.html - check this out - use a pre and post hook, what you want to do is a have a check method for redis cache in pre and in post you want to write if you ended up doing a read (or whatever it is you are wanting to cache).
The user contributed provide some great examples as well: http://propelorm.org/documentation/cookbook/user-contributed-behaviors.html
Another thing to consider (based on what you are trying to accomplish) is that you can also cache things client side in a browser via local storage.
We do that for things like a menu that has items with "previously visited items" - we don't care to store that, but the user finds it helpful
Denis Turkov
@PhilinTv
Hello everyone,
Propel2 like a Phoenix got the first release in recent years with PHP7.4 and Symfony5 support.
https://github.com/propelorm/Propel2/releases/tag/2.0.0-alpha9
http://propelorm.org/blog/2020/06/25/propel2-alpha-9-is-released.html
In case of any compatibility troubles, you know what to do https://github.com/propelorm/Propel2/issues/new
:)
Daniel Rose
@daniel-rose
Hello everyone,
how can i add a subquery to a where clause?
J Skoba
@SpikedCola
Hi all, i'm trying to override the mapping between Propel types and native SQL types, per the section at the bottom of http://propelorm.org/documentation/10-configuration.html
When I try and specify the new class to be used
propel.platform.class = propel.engine.platform.${propel.database}Platform
I subsequently get an error when running propel build: Unrecognized option "platform" under "propel". Available options are "database", "exclude_tables", "general", "gene
rator", "migrations", "paths", "reverse", "runtime".
J Skoba
@SpikedCola
so i think the correct key is propel.generator.platformClass .. filed an issue on github so docs can be updated. ty for the great orm!
EDILSON PEREIRA DA SILVA
@EdilsonLab_gitlab
Good Morning. I can't get propel to work with php5.6 on linux mint. Unable to connect to the specific sql server: could not find driver
I'm using mysql
Denis Turkov
@PhilinTv
Hey @EdilsonLab_gitlab , unfortunately, this could happen. Propel2 won't support EOL dependencies. It's probably is a good time to migrate to a php7.x.
Jazzgeir
@Jazzgeir
In order to stay within lifespan, you'll need to migrate to php7.2 or newer, in fact
This fits well with the recent upgrade of Propel, btw. :-D
propelorm.org actually says: "A highly customizable and blazing fast ORM library for PHP 5.5+."
J Skoba
@SpikedCola
how can i use paginate() along with saving , eg to process rows that have a null value? i tried incrementing page, this works but stops halfway through the result set.
eg. i want to process 1k rows at a time. before doing anything, my query returns 10k rows to be processed. paginate & saving works on the first 5 pages/first 5k rows, but on the 6th page it stops working. i guess its because the query now only returns 5k rows, so page 6 is nonsensical.
maybe this is just not the right use for paginate, i should get rows and process until there are no more left.
J Skoba
@SpikedCola
hey all, i'd like to start unit testing some of my more complicated business logic. currently i am working across two databases. propel handles this really well. how will this work for testing? setUp and tearDown will need to do some setup/cleaning on 2 databases. it doesnt look like the sample tests would work in my case. any suggestions?
PavanTatikonda
@PavanTatikonda
Hello Everyone, Need some help on the following (we are using symfony-1.0.21, propel-1.2.1, creole-1.14):
  1. Where could I look for connection pool related settings for propel
  2. How could I pass updated password after Propel::getConnection() is called
    Scenario is, during application start-up we fetch password from aws secrets manager and calling "Propel::getConnection()" and at a later point of time the password in secrets manager will be changes and new connections from application should be able to override the new password from secrets manager (Note:- We are able to fetch latest/modified password from aws secrets manager but wondering how could I pass that to Propel::getConnection() ). Any suggestions/inputs would be helpful!
Ryan Rentfro
@SourceCode

I have noticed an issue in propel/propel/src/Propel/Generator/Model/Table.php - involving hasCompositeKey and when a table is missing it, it never makes it to its exception (foreignTable is null).

if ($foreignTable->hasCompositePrimaryKey()) is the check that is the issue in the scenario. I am going to try and send a MR in for it, but its pretty edge - but debugging it required diving as the exception / error was useless to indicate where it happend.

Ryan Rentfro
@SourceCode
[Propel\Generator\Exception\BuildException]
Table "contact_controls" contains a foreign key to nonexistent table "company"
This is an example of the message expected in the situation.
Ryan Rentfro
@SourceCode
PR sent
EDILSON PEREIRA DA SILVA
@EdilsonLab_gitlab
Good afternoon! I have two banks practically the same, however one needs to get data from the other's table. Is it possible with propel using the same connection? I would like that whenever I do something on a certain table, they do it on the other bank. Could someone light my way? Thanks (I use mysql)
not bank, databases
EDILSON PEREIRA DA SILVA
@EdilsonLab_gitlab
I want Join query across different Database...
J Skoba
@SpikedCola
hi all, is "collection" a reserved keyword for propel class names?
J Skoba
@SpikedCola
*reserved suffix that is. i dont seem to be able to name a class "Product" and another class "ProductCollection", it seems to conflict with propel's internal Collection class
Robert Butler
@lighth7015
So question, how do I enable debugging for pgsql?
Tuğca Eker
@tugcaeker_twitter
Hi, I'm curious about "classPrefix" feature on the generator. It seems like broken and not adding the prefix to filenames and also class names.
Is there any documentation about it? Or maybe some examples?