# |
Jul 23rd 2017, 10:16 |
tokam |
which makes it hard for me to rename my association :( |
# |
Jul 23rd 2017, 10:16 |
tokam |
'owner_name' => 'SELECT name FROM project_owners WHERE project_owners.id = ProjectPage.project_owner_id', |
# |
Jul 23rd 2017, 10:15 |
tokam |
the issue is, that the ProjectPage has a virtual field.... |
# |
Jul 23rd 2017, 10:14 |
tokam |
they are assoiciated with two tables |
# |
Jul 23rd 2017, 10:14 |
tokam |
no |
# |
Jul 23rd 2017, 10:14 |
chris-andre |
@tokam Capephp 2? Anyway, are all three associations associated with Projects table? Then className should be 'Projects' |
# |
Jul 23rd 2017, 10:01 |
tokam |
(datatable name) |
# |
Jul 23rd 2017, 10:00 |
tokam |
the current pasted mapping leads to an error, because cake php tries to use my alias name as a database name |
# |
Jul 23rd 2017, 10:00 |
tokam |
how must my mapping look like? |
# |
Jul 23rd 2017, 10:00 |
tokam |
I like to use the aliases: ProjectPreviewPage and ProjectInvestmentPage |
# |
Jul 23rd 2017, 10:00 |
tokam |
the table I am referring to is named project_page |
# |
Jul 23rd 2017, 10:00 |
tokam |
https://paste.ubuntu.com/25152893/ |
# |
Jul 23rd 2017, 10:00 |
tokam |
I like to have one entity have two associations to an other table... |
# |
Jul 23rd 2017, 10:00 |
tokam |
Hello |
# |
Jul 23rd 2017, 08:59 |
theskillwithin |
https://youtu.be/evYxx8qjZFs |
# |
Jul 23rd 2017, 08:29 |
birdy247 |
using i18n |
# |
Jul 23rd 2017, 08:29 |
birdy247 |
2018-09-07T08:00:00.000Z |
# |
Jul 23rd 2017, 08:29 |
birdy247 |
Anyone know of a nifty way to format a dattime like this |
# |
Jul 23rd 2017, 08:01 |
saeideng |
morning |
# |
Jul 23rd 2017, 07:27 |
birdy247 |
morning |
# |
Jul 23rd 2017, 01:03 |
royalty |
https://gist.github.com/Modicrumb/6917d9aca6821f4c3cae9be3f5a6fec7 |
# |
Jul 23rd 2017, 01:03 |
royalty |
having a small problem with cake validation, just not sure how to validate an empty field of a related model |
# |
Jul 23rd 2017, 01:02 |
royalty |
hello |
# |
Jul 22nd 2017, 22:51 |
itamer |
answering my own questions, hopefully, the tutorial has the function still in Table. Just need to check up on the variables. |
# |
Jul 22nd 2017, 22:48 |
slackebot |
membership record would have a function calculating when it ended and could be called when you create a person + membership or when you just created the membership. That info doesn't seem to belong in a Table but doesn't seem to belong in Entity either. Have I missed something? |
# |
Jul 22nd 2017, 22:48 |
itamer |
v3 newbie question In earlier versions I could load up the model with dropdown lists and functions that could then be called by any controller that had access to the model which meant I could ensure that the same logic was being used throughout the website. We don't use salutations for a person, but lets say we did, it would mean that any controller that might use a person could be sure of having the right list of possible salutations. Or |
# |
Jul 22nd 2017, 19:26 |
banna |
Second time it doesn't even go to logout action |
# |
Jul 22nd 2017, 19:24 |
banna |
public function logout() { $this->Cookie->delete('remember_me'); $this->Auth->logout(); $this->redirect(array('plugin' => false, 'controller' => "users", 'action' => "login")); } |
# |
Jul 22nd 2017, 19:23 |
banna |
You won't be able to logout second time. |
# |
Jul 22nd 2017, 19:23 |
banna |
then logout and login - tjax78@gmail.com / test4321 |
# |
Jul 22nd 2017, 19:22 |
banna |
First login using - giannigame@tiscali.it / test1234 |
# |
Jul 22nd 2017, 19:21 |
banna |
To see the issue please visit the url - http://dev.casaparticulares.net/dashboard |
# |
Jul 22nd 2017, 19:21 |
banna |
I am using cakephp 2.9, On the server i can't logout after logging in second time using two different account |
# |
Jul 22nd 2017, 17:24 |
iblumbo |
because that's the real issue, class parameters has to be encapsulated in my assignment |
# |
Jul 22nd 2017, 17:23 |
iblumbo |
but do you think that the way cake use the magic getters and setter can be considered encapsulation? |
# |
Jul 22nd 2017, 17:21 |
iblumbo |
no, it's my first time with it hmic but now I've got what you've meant |
# |
Jul 22nd 2017, 17:09 |
hmic |
you need to know still, most if not all of the cakephp functions accessing entites will not work if the properties are private. because they expect them beeing accessible of course... |
# |
Jul 22nd 2017, 17:08 |
hmic |
just by creating your own entity base class and extending that instead of the cakephp one |
# |
Jul 22nd 2017, 17:07 |
hmic |
you can make your entity classes use your own entity trait instead of the cakephp provided one easily. |
# |
Jul 22nd 2017, 17:06 |
hmic |
iblumbo: have you worked with the magic getters and setter in php before? - if not, read the php manual about them, there are examples provided. you can just return NULL from a getter or raise an exception e.g. which basically makes the var private. |
# |
Jul 22nd 2017, 17:05 |
iblumbo |
I checked the EntityTrait and I did see the _set method, but I've got stuck in where to override it and how make them look private :/ |