Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.35 KB

PidType.md

File metadata and controls

33 lines (23 loc) · 1.35 KB

PidType Enum

Specify the way how an EntityStore generates entity Pid's.

public enum PidType

Fields

RandomPids 1

Map random Pid's to Id's used within the engine at runtime.
This method is intended to be used to store entities of an EntityStore in JSON files or in a database.

UsePidAsId 0

Used to simplify testing as the pid and id of an entity are equal.
It also increases performance in case ids are consecutively.
This method is not intended to be used to store entities of an EntityStore in JSON files or in a database.

Remarks

Disadvantages:

  • Big gaps between ids are wasted memory.
  • When add entities in a database id clashes with entities added by other users are very likely.
  • High probability of merge conflicts caused by id clashes by adding the same entity ids by multiple users.