Log message #4183100

# At Username Text
# Apr 13th 2019, 13:29 markstory It is a method on Controller. It loads components based on their name.
# Apr 13th 2019, 11:25 om.axisweb and how it work ?
# Apr 13th 2019, 11:23 om.axisweb what is cakephp 3 in $this->loadComponent('Csrf'); ?
# Apr 13th 2019, 10:54 biesbjerg Nevermind, wrong primaryKey in my GymsTable :-/
# Apr 13th 2019, 10:40 biesbjerg Any idea what's going on?
# Apr 13th 2019, 10:40 biesbjerg https://gist.github.com/biesbjerg/6d7985ec3b2a3ddeb580abf9aeb39b3e
# Apr 13th 2019, 10:39 biesbjerg (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION)
# Apr 13th 2019, 10:39 biesbjerg I'm trying to save an entity (Event) with associated data (Gym). I have database constraint on events.gym_id -> gyms.id. When I try to save the data I get an error (I'm guessing Cake saves the event before the gym exists?): Error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`cfc`.`events`, CONSTRAINT `events_ibfk_1` FOREIGN KEY (`gym_id`) REFERENCES `gyms`
# Apr 13th 2019, 07:55 slackebot <adithya>
# Apr 13th 2019, 07:51 adithya Hi, I have a MainController even and i have the auth allow set i the before filter method , i'm being redirected to login , how do i allow accessing this without the user having to login
# Apr 13th 2019, 00:52 waspinator I'm trying to get crud jsonapi to work, but I'm not sure how to actually make the request. it doesn't use extension routing right? In postman I just put in the regular url (localhost:8765/users) and added a Headers `Accept` key with value `application/vnd.api+json`, but all I get back is the regular view template.
# Apr 13th 2019, 00:24 waspinator is the crud plugin required to use the crud jsonapi?
# Apr 12th 2019, 22:06 ricksaccous https://stackoverflow.com/questions/18725941/mysql-order-by-best-match
# Apr 12th 2019, 22:06 ricksaccous I think I found an answer to my second question
# Apr 12th 2019, 22:03 ricksaccous ex WAGE is more similar to WAGE rather than WAGEING or something
# Apr 12th 2019, 22:03 ricksaccous also let's say that I wanted to order like query based on similarity
# Apr 12th 2019, 22:02 ricksaccous how would i end up doing that
# Apr 12th 2019, 22:02 ricksaccous ex i want to order by matched elements where x = y first
# Apr 12th 2019, 22:02 ricksaccous but i wanted to order giving one set of conditions priority
# Apr 12th 2019, 22:01 ricksaccous suppose I had two sets of conditions i wanted to query by
# Apr 12th 2019, 22:01 ricksaccous this is kind of a weird question but probably just highlights my unfamiliarity with SQL
# Apr 12th 2019, 21:05 ricksaccous yep no problem
# Apr 12th 2019, 21:05 abdualelah.mdy thanks
# Apr 12th 2019, 21:04 abdualelah.mdy worked now
# Apr 12th 2019, 20:53 ricksaccous sure
# Apr 12th 2019, 20:53 abdualelah.mdy i will try to disable it then bake
# Apr 12th 2019, 20:52 ricksaccous are you trying to extend the plugin model?
# Apr 12th 2019, 20:52 ricksaccous and you're answer might just be setting them correctly
# Apr 12th 2019, 20:52 ricksaccous i remember it has config settings though
# Apr 12th 2019, 20:52 ricksaccous yeah i don't really want to look into what that plugin does right now, lol
# Apr 12th 2019, 20:51 ricksaccous oh you are messing with that plugin
# Apr 12th 2019, 20:50 abdualelah.mdy @ricksaccous
# Apr 12th 2019, 20:50 abdualelah.mdy I deleted all associations. but the issue is the same
# Apr 12th 2019, 20:49 slackebot Error: [RuntimeException] Cake\ORM\Table association "Users" of type "manyToOne" to "CakeDC\Users\Model\Table\UsersTable" doesn't match the expected class "App\Model\Table\UsersTable". You can't have an association of the same name with a different target "className" option anywhere in your app. in C:\xampp\htdocs\bookedServer\vendor\cakephp\cakep
# Apr 12th 2019, 20:49 abdualelah.mdy One moment while associations are detected. Exception: Cake\ORM\Table association "Users" of type "manyToOne" to "CakeDC\Users\Model\Table\UsersTable" doesn't match the expected class "App\Model\Table\UsersTable". You can't have an association of the same name with a different target "className" option anywhere in your app. in [C:\xampp\htdocs\bookedServer\vendor\cakephp\cakephp\src\ORM\Association.php, line 475] 2019-04-12 20:48:28
# Apr 12th 2019, 20:43 ricksaccous just have to name them differently
# Apr 12th 2019, 20:43 ricksaccous if you want, you can have both of them,
# Apr 12th 2019, 20:42 abdualelah.mdy ?
# Apr 12th 2019, 20:42 abdualelah.mdy so i need to keep one of them
# Apr 12th 2019, 20:42 ricksaccous the first param given to a relationship definer is the association name
# Apr 12th 2019, 20:42 ricksaccous $this->belongsTo('AssociationName');