Log message #4204996

# At Username Text
# Sep 21st 2019, 08:19 jotpe My request data looks something like this
# Sep 21st 2019, 08:19 jotpe So i just readd them
# Sep 21st 2019, 08:19 jotpe Yes, people can have different organization affiliations.
# Sep 21st 2019, 08:18 adam282 Okay, but what if you have a new talk and a person already exists in the database table? You’re going to add them again?
# Sep 21st 2019, 08:18 jotpe yes
# Sep 21st 2019, 08:18 adam282 Like first name, last name, etc?
# Sep 21st 2019, 08:18 jotpe yes
# Sep 21st 2019, 08:17 adam282 Okay, so there are fields?
# Sep 21st 2019, 08:17 jotpe The author is added in that form, not from a list. To add a author no new view is rendered. It's just the same form.
# Sep 21st 2019, 08:16 adam282 No problem. I am learning CakePHP 3.x so I feel your pain.
# Sep 21st 2019, 08:15 jotpe Thanks for your help! ;) I'm just learning
# Sep 21st 2019, 08:15 adam282 Sorry if I am not being of much help.
# Sep 21st 2019, 08:15 adam282 So either use a button to add a new person or a drop down with an auto select or something.
# Sep 21st 2019, 08:14 adam282 Okay, so that’s easy.
# Sep 21st 2019, 08:14 adam282 When submitted, provided the data is formatted properly and the associations are set up in the model, it should just work.
# Sep 21st 2019, 08:14 jotpe There's on form to add a talk, within this form you can add Authors, Speakers, ...
# Sep 21st 2019, 08:14 adam282 So, in one of my apps I have an option for a subscription to be part of multiple distribution lists. To select distribution lists, there’s a multiple select box: ``` <?php echo $this->Form->input('DistributionList', array('type' => 'select', 'empty' => false, 'options' => $lists, 'class' => 'form-control selectpicker', 'id' => 'distribution_list', 'multiple' => true, 'size' => '10')); ?> ```
# Sep 21st 2019, 08:13 adam282 Hm, I don’t quite understand.
# Sep 21st 2019, 08:13 jotpe I add a talk and from this form the user can add authors
# Sep 21st 2019, 08:12 adam282 Hm, what do you mean? How’s the interface designed? Are you going to a talk and adding people from there or are you going to people and adding talks? I mean, either way, it shouldn’t be that difficult.
# Sep 21st 2019, 08:11 jotpe Yes, I ended up having some model associations like this. But When I want to add a talk by form it gets messy. Can't just add $requestdata = ['talk.title' ='XYZ', 'authors => ['first_name' => 'Test', ...]
# Sep 21st 2019, 08:09 adam282 And this is only if `people` can belong to more than one `talk`. If not, you can simply this by removing `talks_peoples` and adding a `talk_id` to the `peoples` table.
# Sep 21st 2019, 08:08 adam282 Disclaimer: I have done this in CakePHP 2.x but not 3.x so there might be some differences.
# Sep 21st 2019, 08:08 adam282 Then, `talks_peoples` (not sure those are named according to conventions so verify them) would contain the `talk_id` and the `people_id` and then the `people` would be tied back to a role via their `people_role_id` which comes from `people_roles`
# Sep 21st 2019, 08:07 adam282 Should be something like that
# Sep 21st 2019, 08:07 slackebot `people_roles` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, `description` longtext DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ```
# Sep 21st 2019, 08:07 slackebot DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `peoples` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `people_role_id` int(11) unsigned NOT NULL DEFAULT '1', `first_name` varchar(32) DEFAULT NULL, `last_name` varchar(32) DEFAULT NULL, `organization` varchar(96) DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE
# Sep 21st 2019, 08:07 adam282 ``` CREATE TABLE `talks` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `call_for_paper_id` int(11) unsigned NOT NULL DEFAULT '1', `category_id` int(11) unsigned NOT NULL DEFAULT '1', `title` varchar(255) DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `talks_peoples` ( `people_id` int(11) DEFAULT NULL, `talk_id` int(11)
# Sep 21st 2019, 08:05 jotpe I tried with a person Model and add a Role to that person. But I can't use save it from the form then.
# Sep 21st 2019, 08:03 adam282 Hm, shouldn’t be that difficult.
# Sep 21st 2019, 08:03 jotpe In my Controller I need to save a talk with the corresponding Authors.
# Sep 21st 2019, 08:03 jotpe Since Author, Spaker and Submitter share the same Information i tried to add a role, but it didn't work that well.
# Sep 21st 2019, 08:02 slackebot <jotpe>
# Sep 21st 2019, 08:01 jotpe Morning, folks. I_ve got a problem with associations:
# Sep 21st 2019, 07:59 adam282 There, got it.
# Sep 21st 2019, 07:59 adam282 Hm
# Sep 21st 2019, 07:59 slackebot Action: admad yawns
# Sep 21st 2019, 07:57 adam282 I might make this kick out an automated e-mail when a new build/release is uploaded as well.
# Sep 21st 2019, 07:56 adam282 Right now, I upload them to S3 and then give them the link to S3 and then make the item private once downloaded but that sucks.
# Sep 21st 2019, 07:56 adam282 This app should be a quick build. Very simple. Users, Applications, Application Builds, Application Releases, Clients. Tie a Client to an App and Builds/Releases to an App, upload the Build/Release to S3 and then be able to provide the Client a link that is not directly to S3 so they can download their mobile app builds/releases
# Sep 21st 2019, 07:55 adam282 Haha, nah, decided not to