Skip to content

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

@xharpenParksuhyeon

Description

@xharpenParksuhyeon

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

(라라벨 한국어 가이드)

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

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

  • BoardCategory
  • BoardData
  • BoardGalleryThumb

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

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions