# ORMExecuteQuery()

Runs the HQL on the default data source specified for the application.

```
ORMExecuteQuery( hql=string, paramsOrUnique=any, uniqueOrQueryOptions=any, queryOptions=any );
```

**Returns:** any

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| hql | string | Yes | The hql query to execute |  |
| paramsOrUnique | any | No | Object parameter for the entity *Alias: params* |  |
| uniqueOrQueryOptions | any | No | Specifies if the object parameter is unique *Alias: unique* |  |
| queryOptions | any | No | Options for the query |  |

# Examples

### Simple Examples

```cfml
res = ormExecuteQuery(
        "SELECT id, A FROM test WHERE id = :A AND A = :B"
        ,{A:"test", B:"aaaa"}
        )

```







# Categories

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