Skip to content

Instantly share code, notes, and snippets.

@miyamoto-daisuke
miyamoto-daisuke / vpc-knowhow-2014-04.template
Last active October 20, 2020 07:02
VPC knownhow 2014-04
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "VPC knowhow template",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern": "[-_ a-zA-Z0-9]*",
@gothedistance
gothedistance / Using bindModel to get to deep relations
Last active December 19, 2015 09:19
CakePHPで深いJoinが必要な場合は、Containableを使うよりも確実に以下のTipsに従ったほうがいい。確実でしかもSQLもシンプルになり、早い。 Via http://mark-story.com/posts/view/using-bindmodel-to-get-to-deep-relations
CakePHP Behaviouer 'Containable' is very useful,but it's not suitable plugin for fetch deep join records.
I want to join 4 Tables as such.
OrderEntryDetail->Item->Maker->Category
Containable runs sql for each model(equivalent each table) but this tricky BindModel/UnBindModel usage solves this problem.
<Before>
<?php
■材料
 ベース油(食用油を模索中、ごま油がベター):欲しい量
 白ネギ(の青い部分):適量
 ニンニク:適量
 唐辛子:適量
 容器:ベース油が入る容積をもった容器
■作成方法
1.ニンニクと白ネギをみじん切りにする。
2.ベース油を鍋に入れる。