Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary Key로 문자열을 사용하는 모델에 keyType 프로퍼티 추가 #95

Closed
xharpenParksuhyeon opened this issue Jan 19, 2023 · 0 comments

Comments

@xharpenParksuhyeon
Copy link
Member

라라벨 6.0에는 integer 키 타입을 위한 성능 향상이 추가되었습니다. 만약 모델의 Primary Key로 문자열 타입을 사용중이라면, $keyType 프로퍼티를 모델에 선언해 주어야 합니다.

(라라벨 한국어 가이드)

/**
 * The "type" of the primary key ID.
 *
 * @var string
 */
protected $keyType = 'string';

아래는 keyType 프로퍼티 값을 string 으로 선언해줘야 하는 모델 목록입니다.

  • Command

💡Comment 모델은 부모 클래스인 Xpressengine\Document\Models\Document 에서 keyType 프로퍼티를 설정하고 있습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant