Some checks failed
App Prod-Parity E2E Dispatch / dispatch (push) Failing after 10s
CD Storybook UI / build (push) Failing after 3m25s
CD Storybook UI / dispatch (push) Has been skipped
CD deploy main / website-changed-files (push) Successful in 18m8s
CI Agent Skills / changed-files-check (push) Successful in 18m9s
CI Create App E2E minimal / changed-files-check (push) Successful in 24s
CI Create App / changed-files-check (push) Successful in 26s
CI Docs / changed-files-check (push) Successful in 26s
CI Emails / changed-files-check (push) Successful in 28s
CI Example App Hello World / changed-files-check (push) Successful in 23s
CI Front / changed-files-check (push) Has been skipped
CI Example App Postcard / changed-files-check (push) Successful in 27s
CI UI / changed-files-check (push) Has been skipped
CI Utils Test / changed-files-check (push) Successful in 45s
CI Twenty Apps / discover (push) Successful in 1m3s
CD deploy main / deploy-main (push) Failing after 3s
CI Agent Skills / agent-skills-validate (push) Has been skipped
CI Create App / create-app-test (lint) (push) Has been skipped
CI Emails / emails-test (push) Has been skipped
CI Front / front-task (lingui:compile) (push) Has been skipped
CI Front / front-task (lint) (push) Has been skipped
CI Example App Postcard / example-app-postcard (push) Has been skipped
CI UI / ui-task (lint) (push) Has been skipped
CI UI / ui-task (pack-size) (push) Has been skipped
CI UI / ui-task (size) (push) Has been skipped
CI UI / ui-task (test) (push) Has been skipped
CI UI / ui-task (typecheck) (push) Has been skipped
CI Utils Test / utils-test (push) Has been skipped
CI Twenty Apps / ${{ matrix.app.name }} (push) Has been skipped
CI Emails / ci-emails-status-check (push) Successful in 2s
CI Example App Hello World / ci-example-app-hello-world-status-check (push) Successful in 2s
CI Example App Postcard / ci-example-app-postcard-status-check (push) Successful in 3s
CI UI / ui-sb-test (push) Has been skipped
CI Utils Test / ci-utils-test-status-check (push) Successful in 2s
CI Twenty Apps / ci-twenty-apps-status-check (push) Successful in 2s
CI UI / ci-ui-status-check (push) Successful in 2s
CI Desktop / desktop (push) Failing after 1m8s
Push docs to Crowdin / Push documentation to Crowdin (push) Failing after 55s
Push translations to Crowdin / Extract and upload translations (push) Failing after 5s
Push website translations to Crowdin / Extract and upload website translations (push) Failing after 5s
CI Create App / create-app-test (test) (push) Has been skipped
CI Create App / create-app-test (typecheck) (push) Has been skipped
CI Docs / docs-lint (push) Has been skipped
CI Example App Hello World / example-app-hello-world (push) Has been skipped
CI Front / front-task (lingui:extract) (push) Has been skipped
CI Front / front-task (test) (push) Has been skipped
CI Front / front-task (typecheck) (push) Has been skipped
CI UI / ui-sb-build (push) Failing after 1m32s
CI Twenty Apps / ${{ matrix.app.name }} (${{ matrix.server-source }}) (push) Has been skipped
CI Agent Skills / agent-skills-publish (push) Has been skipped
CI Create App / ci-create-app-status-check (push) Successful in 2s
CI Agent Skills / agent-skills-remote-source (push) Has been skipped
CI Create App E2E minimal / create-app-e2e-minimal (push) Has been cancelled
CI E2E Main / e2e-test (push) Has been cancelled
CI Front / front-sb-build (push) Has been cancelled
CI Front / front-build (push) Has been cancelled
CI Create App E2E minimal / ci-create-app-e2e-minimal-status-check (push) Has been cancelled
CI E2E Main / ci-e2e-main-status-check (push) Has been cancelled
CI E2E Main / notify-main-ci-failure (push) Has been cancelled
CI E2E Main / qa-scout-comment (push) Has been cancelled
CI Front / front-sb-test (push) Has been cancelled
CI Front / front-sb-screenshots (push) Has been cancelled
CI Front / ci-front-status-check (push) Has been cancelled
DPA Sub-Processor Sync / sync-subprocessors (push) Failing after 3s
AI Catalog Sync / sync-catalog (push) Failing after 2s
95 lines
3.8 KiB
Plaintext
95 lines
3.8 KiB
Plaintext
---
|
|
title: 관계 필드
|
|
description: 관계 필드를 사용하여 서로 다른 객체의 레코드를 연결하세요.
|
|
---
|
|
|
|
## 관계 유형
|
|
|
|
### 일대다
|
|
|
|
객체 A의 하나의 레코드는 객체 B의 여러 레코드에 연결될 수 있습니다.
|
|
|
|
**예:** 하나의 회사에는 여러 사람(직원)이 있을 수 있습니다.
|
|
|
|
### 다대일
|
|
|
|
객체 A의 여러 레코드는 객체 B의 하나의 레코드에 연결될 수 있습니다.
|
|
|
|
**예:** 여러 사람이 하나의 회사에 속할 수 있습니다.
|
|
|
|
### 여러 객체 유형으로의 관계
|
|
|
|
일부 객체는 관계의 한쪽에서 여러 객체 유형에 연결될 수 있습니다.
|
|
|
|
**예:** 노트는 동시에 한 사람, 한 회사, 한 기회에 첨부될 수 있습니다. 노트는 "다수" 쪽에 있으며 여러 "하나" 쪽과 연결됩니다.
|
|
|
|
<img src="/images/user-guide/fields/many-to-one-morph.png" style={{width:'100%'}} />
|
|
|
|
마찬가지로, 프로젝트("하나" 쪽)는 여러 사람, 여러 회사, 여러 노트로부터 연결을 받을 수 있습니다.
|
|
|
|
<img src="/images/user-guide/fields/one-to-many-morph.png" style={{width:'100%'}} />
|
|
|
|
<Warning>
|
|
**가져오기/내보내기 제한 사항**: 여러 객체 유형을 가리키는 관계는 CSV 가져오기/내보내기에서 아직 지원되지 않습니다. 이는 로드맵에 포함되어 있습니다.
|
|
</Warning>
|
|
|
|
### 다대다
|
|
|
|
객체 A의 여러 레코드는 객체 B의 여러 레코드에 연결될 수 있습니다.
|
|
|
|
**예:** 여러 사람은 여러 프로젝트에 연결될 수 있으며, 그 반대도 가능합니다.
|
|
|
|
다대다 관계는 **연결 객체** 패턴을 사용합니다: 양쪽을 연결하는 중간 객체. 연결 관계 기능을 사용하면 Twenty는 중간 객체를 UI에서 숨기고 최종 연결된 레코드를 직접 표시합니다.
|
|
|
|
<Warning>
|
|
**베타 기능**: 사용하려면 **Settings → Community → Features**에서 연결 관계를 활성화해야 합니다.
|
|
</Warning>
|
|
|
|
자세한 단계별 가이드는 [다대다 관계 생성 방법](/l/ko/user-guide/data-model/how-tos/create-many-to-many-relations)을 참조하세요.
|
|
|
|
## 관계 필드 만들기
|
|
|
|
1. **설정 → 데이터 모델**로 이동
|
|
2. 관계를 추가하려는 객체를 선택합니다.
|
|
3. **+ 새 필드**를 클릭합니다
|
|
4. 필드 유형으로 **관계**를 선택합니다.
|
|
5. 연결할 대상 객체를 선택합니다.
|
|
6. 관계 설정을 구성합니다:
|
|
* **원본 객체의 필드 이름**: 현재 편집 중인 객체에 있는 관계 필드의 이름
|
|
* **대상 객체의 필드 이름**: 대상 객체에 표시될 관계 필드의 이름
|
|
* 관계 유형(일대다, 다대일)
|
|
7. **저장** 클릭
|
|
|
|
## 표준 관계
|
|
|
|
Twenty에는 표준 객체 간에 사전 구성된 관계가 제공됩니다:
|
|
|
|
| 원본 객체 | 대상 객체 | 관계 유형 |
|
|
| ----- | ----- | ----- |
|
|
| 사람들 | 회사 | 다대일 |
|
|
| 기회 | 회사 | 다대일 |
|
|
| 기회 | 사람들 | 다대일 |
|
|
|
|
## 모범 사례
|
|
|
|
### 관계 계획
|
|
|
|
* **데이터 모델을 매핑하세요**: 생성하기 전에 관계를 계획합니다
|
|
* **방향을 고려하세요**: 어느 객체가 관계를 "소유"하는지 생각하세요
|
|
* **순환 의존성을 피하세요**: 데이터 모델을 깔끔하게 유지하세요
|
|
|
|
### 관계 이름 지정
|
|
|
|
* **명확한 이름을 사용하세요**: 관계가 무엇을 나타내는지 분명하게 하세요
|
|
* **일관성을 유지하세요**: 관계 전반에서 유사한 명명 패턴을 사용하세요
|
|
* **양쪽을 고려하세요**: 관계의 양쪽에 적절한 이름을 지정하세요
|
|
|
|
### 성능
|
|
|
|
* **과도한 관계 설정은 피하세요**: 관계가 너무 많으면 워크스페이스가 느려질 수 있습니다
|
|
|
|
## 제한 사항
|
|
|
|
* **관계를 삭제**하면 링크는 제거되지만 관련 레코드는 삭제되지 않습니다
|
|
* **순환 관계**는 데이터 무결성을 위해 피해야 합니다
|