# |
Jan 28th 2014, 19:28 |
liamkeily |
http://bin.cakephp.org/view/373845727 |
# |
Jan 28th 2014, 19:25 |
liamkeily |
I'm trying to use the contain parameter on a find query to include another model which has a hasMany relationship. But it says it can't because the models are not associated.. confused |
# |
Jan 28th 2014, 18:49 |
liamkeily |
ah, i wasn't sure what HasAndBelongsToMany is for. I have just used belongsTo in my joining model. I will try that thanks :) |
# |
Jan 28th 2014, 18:44 |
BackEndCoder |
... |
# |
Jan 28th 2014, 18:42 |
hiryu85 |
hello |
# |
Jan 28th 2014, 18:42 |
riotera |
hello |
# |
Jan 28th 2014, 18:42 |
hiryu85 |
hello |
# |
Jan 28th 2014, 18:39 |
dereuromark |
it does that automatically this way |
# |
Jan 28th 2014, 18:39 |
dereuromark |
liamkeily: that is the default behavior of cakephp for habtm |
# |
Jan 28th 2014, 18:33 |
liamkeily |
is it good practice to delete all existing records before re-saving, so that ones that are unchecked are removed. Or maybe theres a better method |
# |
Jan 28th 2014, 18:16 |
BackEndCoder |
and they wonder why it was load heavy |
# |
Jan 28th 2014, 18:16 |
BackEndCoder |
with no cache |
# |
Jan 28th 2014, 18:16 |
BackEndCoder |
i just found 26 lines with requestaction in this app |
# |
Jan 28th 2014, 18:16 |
BackEndCoder |
omg |
# |
Jan 28th 2014, 17:33 |
Froobly |
how can i get friendsofcake/crud to return an array of objects instead of an object containing an array of objects? |
# |
Jan 28th 2014, 17:26 |
biesbjerg |
might do that :-) dicovered a bug in my diff algorithm though, so still working on it |
# |
Jan 28th 2014, 17:23 |
dereuromark |
biesbjerg: make it pluginaized and i will use it too |
# |
Jan 28th 2014, 17:13 |
styks1987 |
I can also visit the url directly /plugin_name/attachments/delete/1 |
# |
Jan 28th 2014, 17:13 |
dereuromark |
;) |
# |
Jan 28th 2014, 17:13 |
biesbjerg |
dereuromark: thank you for the idea about calculating the position diff and using move up/down - works like a charm! :-) |
# |
Jan 28th 2014, 17:12 |
nurulhuda |
good night |
# |
Jan 28th 2014, 17:04 |
styks1987 |
it is like it is not detecting that it is a delete request and it just looks for the method of 1 |
# |
Jan 28th 2014, 17:02 |
styks1987 |
yes 'routes'=>true in bootstrap. And /plugin_name/cotroller.json works |
# |
Jan 28th 2014, 17:01 |
Neon1024 |
Are you loading the plugins routes file in your CakePlugin::load()? |
# |
Jan 28th 2014, 17:00 |
styks1987 |
and Router::parseExtensions(); |
# |
Jan 28th 2014, 17:00 |
styks1987 |
in the plugins routes.php |
# |
Jan 28th 2014, 17:00 |
styks1987 |
likely, but I am using the default routes Router::mapResources('attachments'); |
# |
Jan 28th 2014, 16:59 |
Neon1024 |
styks1987: Sounds like a routing issue |
# |
Jan 28th 2014, 16:59 |
Froobly |
in friendsofcake/crud, why is beforeRender() called twice? :s |
# |
Jan 28th 2014, 16:56 |
styks1987 |
it says Action AttachmentsController::1() could not be found. |
# |
Jan 28th 2014, 16:48 |
styks1987 |
I have a function called delete in the controller |
# |
Jan 28th 2014, 16:48 |
styks1987 |
I am trying to send a delete request to a plugin controller but it keeps telling me the function does not exist. /plugin_name/controller.json works but /plugin_name/controller/id.json via DELETE request returns a 404 |
# |
Jan 28th 2014, 16:32 |
biesbjerg |
I'm doing it the easy way for now by only making it possible to reorder within the same parent |
# |
Jan 28th 2014, 16:32 |
biesbjerg |
ah, yes |
# |
Jan 28th 2014, 16:32 |
dereuromark |
by moving a record somewhere else it might have a different parent_id |
# |
Jan 28th 2014, 16:31 |
biesbjerg |
don't understand what you mean by "first modify parent_id" though |
# |
Jan 28th 2014, 16:31 |
biesbjerg |
dereuromark: might also work |
# |
Jan 28th 2014, 16:29 |
dereuromark |
you first modify parent_id and afterwards move it up/down until the correct position is reached |
# |
Jan 28th 2014, 16:29 |
biesbjerg |
jose_zap :) |
# |
Jan 28th 2014, 16:29 |
dereuromark |
biesbjerg: bad.. calc the diff to the current structure and then modify accordingly |
# |
Jan 28th 2014, 16:28 |
biesbjerg |
gives me* |