# EntityMerge()

Attaches given entity to current ORM session

```
EntityMerge( entity=any );
```

**Returns:** any

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| entity | any | Yes | The entity that must be attached to the ORM session. |  |

# Examples

```cfml
entity = entityLoad( "users", {FirstName="lucee"}, true );
ormclearsession();
EntityMerge( entity ); //merge entity
writeOutput(ormgetsession().getStatistics().getEntityCount());
```







# Categories

[ORM](../../categories/orm.md)