{
	"name": "relation/ma/relation.json",
	"relation": [
		{
			"linking_field": "travel_expense_id",
			"link_type": "delete with",
			"linking_table": "driving_log",
			"linked_table": "travel_expense",
			"linked_field": "travel_expense_id"
		},
		{
			"linking_field": "expense_type_id",
			"link_type": "prevent delete",
			"linking_table": "driving_log",
			"linked_table": "expence_type",
			"linked_field": "expense_type_id"
		},
		{
			"linking_field": "task_id",
			"link_type": "delete with",
			"linking_table": "task_work",
			"linked_table": "task",
			"linked_field": "record_id"
		},
		{
			"linking_field": "employee_id",
			"link_type": "delete with",
			"linking_table": "task_work",
			"linked_table": "employee",
			"linked_field": "employee_id"
		},
		{
			"linking_field": "employee_id",
			"link_type": "prevent delete",
			"linking_table": "timecard",
			"linked_table": "employee",
			"linked_field": "employee_id"
		},
		{
			"linking_field": "employee_id",
			"link_type": "prevent delete",
			"linking_table": "travel_expense",
			"linked_table": "employee",
			"linked_field": "employee_id"
		},
		{
			"linking_field": "approver_id",
			"link_type": "prevent delete",
			"linking_table": "travel_expense",
			"linked_table": "employee",
			"linked_field": "employee_id"
		},
		{
			"linking_field": "travel_expense_id",
			"link_type": "delete with",
			"linking_table": "travel_expense_row",
			"linked_table": "travel_expense",
			"linked_field": "travel_expense_id"
		},
		{
			"linking_field": "expense_type_id",
			"link_type": "prevent delete",
			"linking_table": "travel_expense_row",
			"linked_table": "expence_type",
			"linked_field": "expense_type_id"
		},
		{
			"linking_field": "offset_account_id",
			"link_type": "prevent delete",
			"linking_table": "account",
			"linked_table": "account",
			"linked_field": "account_id"
		},
		{
			"linking_field": "capacity_id",
			"link_type": "prevent delete",
			"linking_table": "capacity_row",
			"linked_table": "capacity",
			"linked_field": "capacity_id"
		},
		{
			"linking_field": "work_load_group_id",
			"link_type": "prevent delete",
			"linking_table": "capacity_row",
			"linked_table": "work_load_group",
			"linked_field": "work_load_group_id"
		},
		{
			"linking_field": "person_id",
			"link_type": "prevent delete",
			"linking_table": "capacity_row",
			"linked_table": "person",
			"linked_field": "person_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "company",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "terms_of_payment_id",
			"link_type": "prevent delete",
			"linking_table": "company",
			"linked_table": "terms_of_payment",
			"linked_field": "terms_of_payment_id"
		},
		{
			"linking_field": "sales_order_code_id",
			"link_type": "prevent delete",
			"linking_table": "company",
			"linked_table": "order_code",
			"linked_field": "order_code_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "company_address",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "company_person",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "person_id",
			"link_type": "prevent delete",
			"linking_table": "invoice",
			"linked_table": "person",
			"linked_field": "person_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "invoice",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "accounting_currency_id",
			"link_type": "prevent delete",
			"linking_table": "invoice",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "terms_of_payment_id",
			"link_type": "prevent delete",
			"linking_table": "invoice",
			"linked_table": "terms_of_payment",
			"linked_field": "terms_of_payment_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "invoice",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "delivery_company_id",
			"link_type": "prevent delete",
			"linking_table": "invoice",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "payee_company_id",
			"link_type": "prevent delete",
			"linking_table": "invoice",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "invoice_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_payment",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "account_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_payment",
			"linked_table": "account",
			"linked_field": "account_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_payment",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "invoice_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_row",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_row",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "order_code_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_row",
			"linked_table": "order_code",
			"linked_field": "order_code_id"
		},
		{
			"linking_field": "order_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_row",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "dispatch_note_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_row",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "account_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_row",
			"linked_table": "account",
			"linked_field": "account_id"
		},
		{
			"linking_field": "offset_account_id",
			"link_type": "prevent delete",
			"linking_table": "invoice_row",
			"linked_table": "account",
			"linked_field": "account_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "material_row",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "material_id",
			"link_type": "prevent delete",
			"linking_table": "material_row",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "person_id",
			"link_type": "prevent delete",
			"linking_table": "order",
			"linked_table": "person",
			"linked_field": "person_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "order",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "terms_of_payment_id",
			"link_type": "prevent delete",
			"linking_table": "order",
			"linked_table": "terms_of_payment",
			"linked_field": "terms_of_payment_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "order",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "delivery_company_id",
			"link_type": "prevent delete",
			"linking_table": "order",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "invoicing_company_id",
			"link_type": "prevent delete",
			"linking_table": "order",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "account_id",
			"link_type": "prevent delete",
			"linking_table": "order_code",
			"linked_table": "account",
			"linked_field": "account_id"
		},
		{
			"linking_field": "order_id",
			"link_type": "prevent delete",
			"linking_table": "order_row",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "order_row",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "order_code_id",
			"link_type": "prevent delete",
			"linking_table": "order_row",
			"linked_table": "order_code",
			"linked_field": "order_code_id"
		},
		{
			"linking_field": "stock_event_id",
			"link_type": "prevent delete",
			"linking_table": "order_row",
			"linked_table": "stock_event",
			"linked_field": "stock_event_id"
		},
		{
			"linking_field": "dispatch_note_id",
			"link_type": "prevent delete",
			"linking_table": "order_row",
			"linked_table": "dispatch_note",
			"linked_field": "dispatch_note_id"
		},
		{
			"linking_field": "invoice_id",
			"link_type": "prevent delete",
			"linking_table": "order_row",
			"linked_table": "invoice",
			"linked_field": "invoice_id"
		},
		{
			"linking_field": "supplier_id",
			"link_type": "prevent delete",
			"linking_table": "product",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "customer_id",
			"link_type": "prevent delete",
			"linking_table": "product",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "purchase_order_code_id",
			"link_type": "prevent delete",
			"linking_table": "product",
			"linked_table": "order_code",
			"linked_field": "order_code_id"
		},
		{
			"linking_field": "sales_order_code_id",
			"link_type": "prevent delete",
			"linking_table": "product",
			"linked_table": "order_code",
			"linked_field": "order_code_id"
		},
		{
			"linking_field": "foreign_sales_order_code_id",
			"link_type": "prevent delete",
			"linking_table": "product",
			"linked_table": "order_code",
			"linked_field": "order_code_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "product_language",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "product_price",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "product_price",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "product_price",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "product_stock",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "product_stock",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "person_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "person",
			"linked_field": "person_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "sales_order_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "repair_purchase_order_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "dispatch_note_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "fault_found_load_group_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "work_load_group",
			"linked_field": "work_load_group_id"
		},
		{
			"linking_field": "faultmade_load_group_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "work_load_group",
			"linked_field": "work_load_group_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "reclamation",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "stock_event",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "person_id",
			"link_type": "prevent delete",
			"linking_table": "stock_event",
			"linked_table": "person",
			"linked_field": "person_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "stock_event",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "stock_event",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "currency_id",
			"link_type": "prevent delete",
			"linking_table": "voucher",
			"linked_table": "currency",
			"linked_field": "currency_id"
		},
		{
			"linking_field": "voucher_id",
			"link_type": "prevent delete",
			"linking_table": "voucher_row",
			"linked_table": "voucher",
			"linked_field": "voucher_id"
		},
		{
			"linking_field": "account_id",
			"link_type": "prevent delete",
			"linking_table": "voucher_row",
			"linked_table": "account",
			"linked_field": "account_id"
		},
		{
			"linking_field": "invoice_id",
			"link_type": "prevent delete",
			"linking_table": "voucher_row",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "invoice_payment_id",
			"link_type": "prevent delete",
			"linking_table": "voucher_row",
			"linked_table": "order",
			"linked_field": "order_id"
		},
		{
			"linking_field": "receiver_id",
			"link_type": "prevent delete",
			"linking_table": "waybill",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "subcontractor_id",
			"link_type": "prevent delete",
			"linking_table": "work_load_group",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "foreman_id",
			"link_type": "prevent delete",
			"linking_table": "work_load_group",
			"linked_table": "employee",
			"linked_field": "employee_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "work_order",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "company_id",
			"link_type": "prevent delete",
			"linking_table": "work_order",
			"linked_table": "company",
			"linked_field": "company_id"
		},
		{
			"linking_field": "product_id",
			"link_type": "prevent delete",
			"linking_table": "work_row",
			"linked_table": "product",
			"linked_field": "product_id"
		},
		{
			"linking_field": "production_lot",
			"link_type": "prevent delete",
			"linking_table": "work_row",
			"linked_table": "work_order",
			"linked_field": "production_lot"
		},
		{
			"linking_field": "work_load_group_id",
			"link_type": "prevent delete",
			"linking_table": "work_row",
			"linked_table": "work_load_group",
			"linked_field": "work_load_group_id"
		},
		{
			"linking_field": "person_id",
			"link_type": "prevent delete",
			"linking_table": "work_row",
			"linked_table": "person",
			"linked_field": "person_id"
		},
		{
			"linking_field": "subcontractor_id",
			"link_type": "prevent delete",
			"linking_table": "work_row",
			"linked_table": "company",
			"linked_field": "company_id"
		}
	]
}