# |
May 5th 2021, 15:17 |
devito |
yeah currently my table only has the 2 columns |
# |
May 5th 2021, 15:15 |
kevin.pfeifer |
like that |
# |
May 5th 2021, 15:15 |
devito |
Ive got an existing table and i want to make a migration to add the pk id column, is there a special option i need to include to do this? I read in the documentation the phinx will make an id col for u but I already have the table |
# |
May 5th 2021, 15:14 |
kevin.pfeifer |
well a "basic" belongstomany connection without any further fields and just the 2 foreign keys doesn't need its own id |
# |
May 5th 2021, 15:14 |
devito |
thanks |
# |
May 5th 2021, 15:14 |
devito |
gotcha |
# |
May 5th 2021, 15:08 |
ndm |
All tables require a primary key if you want to save data to them via the ORM. |
# |
May 5th 2021, 14:52 |
devito |
```do junction tables in cake3 require a pk id?``` |
# |
May 5th 2021, 14:51 |
devito |
```Cannot insert row in "feeds_slugs" table, it has no primary key.``` |
# |
May 5th 2021, 14:51 |
devito |
im getting this error right now |
# |
May 5th 2021, 14:51 |
devito |
save returns true |
# |
May 5th 2021, 14:34 |
greg138 |
The attribute is showing as dirty? Are changes to the main entity saved? Are there errors noted in any of the entities or your logs? Does the save function return false? |
# |
May 5th 2021, 14:22 |
devito |
after i patch the entity i see the attribute populated with individual records its jus tnot saving. a real head scratcher this oen is |
# |
May 5th 2021, 14:19 |
devito |
hello everyone. I am having a wierd problem. My BTM relationship isnt saving. Im converting my ids into _ids array and then passing it to patchentity on the main model but when it saves the junction table does not reflect the associated items. anyone have any ideas why this would happen? Im also setting ids only in the patchentity options to true |
# |
May 5th 2021, 14:11 |
me1367 |
yea, just lookup each package, slap the versions that should be compatible (or in the case with the ones I'm trying to fix, want to make compatible) and then run the command |
# |
May 5th 2021, 14:08 |
kevin.pfeifer |
“working” versions depend on what cakephp base version you are using |
# |
May 5th 2021, 14:07 |
me1367 |
I'll try what Kevin said... |
# |
May 5th 2021, 14:04 |
kevin.pfeifer |
you need to adjust the composer.json to the “working” version strings and the perform `composer update --with-dependencies` |
# |
May 5th 2021, 14:04 |
ndm |
Well somewhere there's still a reference to an old bake that needs to be updated |
# |
May 5th 2021, 14:02 |
me1367 |
Which is what I'm trying to do but it won't let me (due to this error) |
# |
May 5th 2021, 14:00 |
ndm |
You need to update all your dependencies to compatible versions at once, cakephp, plugins, etc. |
# |
May 5th 2021, 13:55 |
me1367 |
*mild internal annoyance* |
# |
May 5th 2021, 13:40 |
me1367 |
Well, I'm trying to update CakePHP of my main project (my website) to CakePHP 4.x but for that I need to also update some plugins I maintain but it gets all blocked because those plugins rely on CakePHP 3.x and Composer refuses to update to the correct branches (which increase the constraint to `^4.2.5` |
# |
May 5th 2021, 13:37 |
slackebot |
your requirements or minimum-stability. - Installation request for admiral/admiral (locked at dev-master, required as dev-77-make-compatible-with-cakephp-4-x) -> satisfiable by admiral/admiral[dev-master].``` I need to update the package to branch version `dev-77-make-compatible-with-cakephp-4-x` so that I can actually start making it compatible with CakePHP 4.x... |
# |
May 5th 2021, 13:37 |
slackebot |
3.6.3, 3.6.4, 3.6.5, 3.6.6, 3.6.7, 3.6.8, 3.6.9, 3.7.0, 3.7.0-RC1, 3.7.0-RC2, 3.7.0-RC3, 3.7.0-beta1, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.6, 3.7.7, 3.7.8, 3.7.9, 3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.11, 3.8.12, 3.8.13, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.9.0, 3.9.0-RC1, 3.9.0-RC2, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7, 3.9.8, 3.9.9, 3.x-dev] but these conflict with |
# |
May 5th 2021, 13:37 |
slackebot |
3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.9.0, 3.9.0-RC1, 3.9.0-RC2, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7, 3.9.8, 3.9.9, 3.x-dev] but these conflict with your requirements or minimum-stability. - admiral/admiral dev-master requires cakephp/cakephp ^3.6 -> satisfiable by cakephp/cakephp[3.10.0-RC1, 3.6.0, 3.6.0-RC1, 3.6.0-RC2, 3.6.0-beta1, 3.6.0-beta2, 3.6.0-beta3, 3.6.1, 3.6.10, 3.6.11, 3.6.12, 3.6.13, 3.6.14, 3.6.15, 3.6.2, |
# |
May 5th 2021, 13:37 |
slackebot |
cakephp/cakephp[3.10.0-RC1, 3.6.0, 3.6.0-RC1, 3.6.0-RC2, 3.6.0-beta1, 3.6.0-beta2, 3.6.0-beta3, 3.6.1, 3.6.10, 3.6.11, 3.6.12, 3.6.13, 3.6.14, 3.6.15, 3.6.2, 3.6.3, 3.6.4, 3.6.5, 3.6.6, 3.6.7, 3.6.8, 3.6.9, 3.7.0, 3.7.0-RC1, 3.7.0-RC2, 3.7.0-RC3, 3.7.0-beta1, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.6, 3.7.7, 3.7.8, 3.7.9, 3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.11, 3.8.12, 3.8.13, 3.8.2, 3.8.3, 3.8.4, |
# |
May 5th 2021, 13:37 |
slackebot |
3.7.5, 3.7.6, 3.7.7, 3.7.8, 3.7.9, 3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.11, 3.8.12, 3.8.13, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.9.0, 3.9.0-RC1, 3.9.0-RC2, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7, 3.9.8, 3.9.9, 3.x-dev] but these conflict with your requirements or minimum-stability. - admiral/admiral dev-master requires cakephp/cakephp ^3.6 -> satisfiable by |
# |
May 5th 2021, 13:37 |
me1367 |
Anyone who knows how I can get around this error: ```Problem 1 - admiral/admiral dev-master requires cakephp/cakephp ^3.6 -> satisfiable by cakephp/cakephp[3.10.0-RC1, 3.6.0, 3.6.0-RC1, 3.6.0-RC2, 3.6.0-beta1, 3.6.0-beta2, 3.6.0-beta3, 3.6.1, 3.6.10, 3.6.11, 3.6.12, 3.6.13, 3.6.14, 3.6.15, 3.6.2, 3.6.3, 3.6.4, 3.6.5, 3.6.6, 3.6.7, 3.6.8, 3.6.9, 3.7.0, 3.7.0-RC1, 3.7.0-RC2, 3.7.0-RC3, 3.7.0-beta1, 3.7.1, 3.7.2, 3.7.3, 3.7.4, |
# |
May 5th 2021, 12:43 |
richard |
also can you not just use if logic blocks - kind of messy i know, but in this case maybe just practical |
# |
May 5th 2021, 12:39 |
richard |
@np some more code would prob be helpful, why are you having trouble over-riding ex, does it not make sense to just create a new controller? can both controllers just rely on a trait that has some logic, can the models just use traits? |
# |
May 5th 2021, 12:24 |
np |
S.O.S => https://discourse.cakephp.org/t/cakephp-4-2-how-to-override-the-mvc-with-the-mvc-from-other-plugin/9308 |
# |
May 5th 2021, 12:15 |
eax |
I’ll check out the PHP Session timeout, thanks! |
# |
May 5th 2021, 08:49 |
rightscoreanalysis |
got it thanks |
# |
May 5th 2021, 08:29 |
kevin.pfeifer |
and if you get inside the if you know that you created an entry and not updating one |
# |
May 5th 2021, 08:29 |
kevin.pfeifer |
correct |
# |
May 5th 2021, 08:28 |
slackebot |
<rightscoreanalysis> |
# |
May 5th 2021, 08:27 |
rightscoreanalysis |
I think this does the same as you're doing in principle: |
# |
May 5th 2021, 08:26 |
rightscoreanalysis |
I mean you can't just throw the data at Cake and it will figure whether to save or update based on what exists in the db? |
# |
May 5th 2021, 08:24 |
kevin.pfeifer |
I dont know what you mean by manual switch |
# |
May 5th 2021, 08:21 |
rightscoreanalysis |
so you are doing a manual switch |