# |
Sep 6th 2019, 13:48 |
ricksaccous |
@vjnvisakh https://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#belongsto |
# |
Sep 6th 2019, 13:47 |
ricksaccous |
hmmm |
# |
Sep 6th 2019, 13:47 |
vjnvisakh |
ok |
# |
Sep 6th 2019, 13:47 |
vjnvisakh |
o |
# |
Sep 6th 2019, 13:47 |
ricksaccous |
it's been too long i don't remember much about cake 2 sorry |
# |
Sep 6th 2019, 13:46 |
ricksaccous |
heh |
# |
Sep 6th 2019, 13:46 |
vjnvisakh |
2 |
# |
Sep 6th 2019, 13:46 |
ricksaccous |
are you on cake2 or 3? |
# |
Sep 6th 2019, 13:45 |
vjnvisakh |
do i give it in bindModel() |
# |
Sep 6th 2019, 13:43 |
ricksaccous |
join type option |
# |
Sep 6th 2019, 13:43 |
ricksaccous |
definition |
# |
Sep 6th 2019, 13:43 |
ricksaccous |
in the association |
# |
Sep 6th 2019, 13:43 |
ricksaccous |
pretty sure there is a join type |
# |
Sep 6th 2019, 13:43 |
vjnvisakh |
hwo to specify an inner join in belongsTo |
# |
Sep 6th 2019, 13:32 |
val |
in 2.x if there is 'id' field then the "entity" is considered not new |
# |
Sep 6th 2019, 13:31 |
val |
is there a way to pass `isNew = false` to `newEntity()`? |
# |
Sep 6th 2019, 13:29 |
alexdd55976 |
at what point? when you call `newEntity()`there is no comparism to the DB |
# |
Sep 6th 2019, 13:28 |
val |
https://api.cakephp.org/3.7/class-Cake.Datasource.EntityTrait.html#_isNew if I create an entity with 'id' that already exists in the database shouldn't `isNew()` return false? |
# |
Sep 6th 2019, 13:27 |
peppejaripappalardo |
Guys, does this method `$entity->getOriginal(property)` work with associated entities? Because even by changing the value, this method continues to return the new value to me without taking into account the value it had before being modified. |
# |
Sep 6th 2019, 13:10 |
alexdd55976 |
you are welcome |
# |
Sep 6th 2019, 13:10 |
maymeow |
@alexdd55976 yes its profiles.... i added ''foreignKey' => 'user_id',` to profiles association in `UsersTable` |
# |
Sep 6th 2019, 13:08 |
info315 |
This sounds a bit like you don't plan to migrate ACLs to version 4? |
# |
Sep 6th 2019, 13:02 |
dereuromark |
i am sure we can then open a cake4 branch |
# |
Sep 6th 2019, 13:02 |
dereuromark |
jep :slightly_smiling_face: just make a PR |
# |
Sep 6th 2019, 13:02 |
info315 |
@dereuromark You mean, if I patch the plugin? ^^ |
# |
Sep 6th 2019, 13:01 |
koeller |
@Alex und @ndm Thanks! Transport seems to be the cake way ^^ |
# |
Sep 6th 2019, 13:00 |
dereuromark |
nook24: If you upgrade it, sure. |
# |
Sep 6th 2019, 12:53 |
alexdd55976 |
oh @ndm `transport` totally forgot about that :+1: |
# |
Sep 6th 2019, 12:52 |
ndm |
@koeller Implement MailJet as a Transport. It can be configured as an application wide default, or per Email instance. |
# |
Sep 6th 2019, 12:50 |
info315 |
Hi, could the ACL plugin also be used with CakePHP 4? https://github.com/cakephp/acl |
# |
Sep 6th 2019, 12:44 |
alexdd55976 |
i think its an easy thing... except i am missing your whole idea of what you wanna do |
# |
Sep 6th 2019, 12:44 |
alexdd55976 |
create an array of variables for cakemailer and use the same array for your own class. |
# |
Sep 6th 2019, 12:43 |
koeller |
One time in CakeMailer and one time in Mailjet |
# |
Sep 6th 2019, 12:42 |
koeller |
Yes, but I would declare the same varialbe two times |
# |
Sep 6th 2019, 12:40 |
alexdd55976 |
why not.. you are initializing a class somewhere, does not matter what class. and if you write your own mailjet class, you can decalre your template variables the same way the cakemailer does |
# |
Sep 6th 2019, 12:39 |
koeller |
but then I would not be able to declare template variables in UserMailer and have to that priot before using for example $this->getMailer(‘User’)->send(‘myMail’) |
# |
Sep 6th 2019, 12:37 |
alexdd55976 |
you can decide before you call the UserMailer |
# |
Sep 6th 2019, 12:36 |
koeller |
But I can’t decide that in for example App\Mailer\UserMailer, because it would use Cake\Mailer |
# |
Sep 6th 2019, 12:34 |
alexdd55976 |
the api seems to be pretty straight forward |
# |
Sep 6th 2019, 12:34 |
alexdd55976 |
@koeller create a class for the mailjet api and decide in code what mailer should be used.. either cakemailer or mailjet |
# |
Sep 6th 2019, 12:32 |
slackebot |
a good idea on how to do that? |