# Objective
Entities are unique, however, this is not reflected in the scene format. Currently, entities are stored in a list where a user could inadvertently create a duplicate of the same entity. 
## Solution
Switch from the list representation to a map representation for entities.
---
## Changelog
* The `entities` field in the scene format is now a map of entity ID to entity data
## Migration Guide
The scene format now stores its collection of entities in a map rather than a list:
```rust
// OLD
(
  entities: [
    (
      entity: 12,
      components: {
        "bevy_transform::components::transform::Transform": (
          translation: (
            x: 0.0,
            y: 0.0,
            z: 0.0
          ),
          rotation: (0.0, 0.0, 0.0, 1.0),
          scale: (
            x: 1.0,
            y: 1.0,
            z: 1.0
          ),
        ),
      },
    ),
  ],
)
// NEW
(
  entities: {
    12: (
      components: {
        "bevy_transform::components::transform::Transform": (
          translation: (
            x: 0.0,
            y: 0.0,
            z: 0.0
          ),
          rotation: (0.0, 0.0, 0.0, 1.0),
          scale: (
            x: 1.0,
            y: 1.0,
            z: 1.0
          ),
        ),
      },
    ),
  },
)
```
		
	
			
		
			
				
	
	
		
			37 lines
		
	
	
		
			639 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			639 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
(
 | 
						|
  entities: {
 | 
						|
    0: (
 | 
						|
      components: {
 | 
						|
        "bevy_transform::components::transform::Transform": (
 | 
						|
          translation: (
 | 
						|
            x: 0.0,
 | 
						|
            y: 0.0,
 | 
						|
            z: 0.0
 | 
						|
          ),
 | 
						|
          rotation: (0.0, 0.0, 0.0, 1.0),
 | 
						|
          scale: (
 | 
						|
            x: 1.0,
 | 
						|
            y: 1.0,
 | 
						|
            z: 1.0
 | 
						|
          ),
 | 
						|
        ),
 | 
						|
        "scene::ComponentB": (
 | 
						|
          value: "hello",
 | 
						|
        ),
 | 
						|
        "scene::ComponentA": (
 | 
						|
          x: 1.0,
 | 
						|
          y: 2.0,
 | 
						|
        ),
 | 
						|
      },
 | 
						|
    ),
 | 
						|
    1: (
 | 
						|
      components: {
 | 
						|
        "scene::ComponentA": (
 | 
						|
          x: 3.0,
 | 
						|
          y: 4.0,
 | 
						|
        ),
 | 
						|
      },
 | 
						|
    ),
 | 
						|
  }
 | 
						|
)
 |