# What's New?

## 3.0.4

* Compatibility updates for ColdBox 6

## 3.0.3

* Optimize [cast ](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/defining-an-entity#casts)caching

## 3.0.2

* Apply [custom sqltypes ](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/defining-an-entity#sql-type)during [eager loading](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/eager-loading).

## 3.0.1

* Account for null values in [`fill`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/creating-new-entities#fill).
* Swap structAppend order for a Lucee bug in mementifier integration.

## 3.0.0

#### **BREAKING CHANGES** <a href="#breaking-changes" id="breaking-changes"></a>

*Please see the* [*Upgrade Guide*](https://quick.ortusbooks.com/3.0.0/upgrade-guide#3-0-0) *for more information on these changes.*

* Drop support for Lucee 4.5 and Adobe ColdFusion 11.
* Virtual Inheritance (using a `quick` annotation instead of extending `quick.models.BaseEntity`) has been removed.  It was hardly used, and removing it allows us to simplify some of the code paths.
* `accessors="true"` is now required on every entity.  This is similar to above where requiring it allows us to simplify the codebase immensely.  A helpful error message will be thrown if `accessors="true"` is not present on your entity.&#x20;
* The `defaultGrammar` mapping needs to be the full WireBox mapping, including the `@qb`, if needed.
  * For instance, `MSSQLGrammar` would become `MSSQLGrammar@qb`.
  * This will allow for other grammars to be more easily contributed via third party modules.
* [`HasManyThrough` relationships](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/hasmanythrough) now only accept a `relationships` parameter of relationship methods to walk to get to the intended entity.
* Attributes using `casts="boolean"` need to be updated to [`casts="BooleanCast@quick"`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/defining-an-entity#casts).
* Some method and parameter names have been changed to support composite keys.  **The majority of changes will only affect you if you have extended base Quick components.** The full list can be found in the Upgrade Guide.

#### &#x20;**Other Changes** <a href="#other-changes" id="other-changes"></a>

* [Bundle Mementifier](https://quick.ortusbooks.com/3.0.0/guide-1/serialization) for memento transformations.
* Use [asMemento](https://quick.ortusbooks.com/3.0.0/guide-1/serialization#asmemento) to automatically convert queries to mementos.
* Automatically-generated [API docs](https://apidocs.ortussolutions.com/#/coldbox-modules/quick/).
* Add error message for defaulting key values.
* Update to [qb 7.0.0](https://qb.ortusbooks.com/).
* Add a [belongsToThrough relationship](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/belongstothrough).
* Add a [HasOneThrough relationship](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/hasonethrough).
* [Custom Casts](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/defining-an-entity#casts) - using custom components to represent one or more attributes.
* [Ordering by relationship attributes](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/ordering-by-relationships).
* [addSubselect](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/query-scopes-and-subselects#subselects) [improvements](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/query-scopes-and-subselects#using-relationships-in-subselects).
* Add a new QuickBuilder to better handle interop with qb.
* [Add `exists` and `existsOrFail` methods](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#existsorfail).
* Allow [custom](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#existsorfail) [error](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#firstorfail) [messages](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#findorfail) for `orFail` methods.
* Ensure `loadRelationship` doesn't reload existing relationships.
* Add multiple retrieve or new/create methods - [`firstWhere`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#firstwhere), [`firstOrNew`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#firstornew), [`firstOrCreate`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#firstorcreate), [`findOrNew`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#findornew), and [`findOrCreate`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#findorcreate).
* Add [`paginate`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#paginate) to Quick.
* Add [`is` and `isNot`](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/defining-an-entity#comparing-entities) to compare entities.
* Allow [hydrating entities](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/retrieving-entities#hydrate) from serialized data.
* Allow returning default entities for null relations on [`HasOne`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/hasone#withdefault), [`BelongsTo`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/belongsto#withdefault), [`HasOneThrough`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/hasonethrough#withdefault), and [`BelongsToThrough`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/belongstothrough#withdefault) relationships.
* Query relations using [`has`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/querying-relationships#has), [`doesntHave`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/querying-relationships#doesnthave), [`whereHas`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/querying-relationships#wherehas), and [`whereDoesntHave`](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/querying-relationships#wheredoesnthave).
* Split `reset` into `reset` and `resetToNew` methods.
* Store the original attributes for later resetting.
* Use `parameterLimits` to eager load.
* Use a new entity each time on BaseService.
* Apply sql types for columns to `wheres`.
* Apply global scopes more consistently
* Correctly ignore key column when updating.
* Fix `hasRelationship` method to only return true for exact matches.
* Better handling of constrained relationships when eager loading.
* Convert aliases when qualifying columns.
* Add a better error message if `onMissingMethod` fails.
* Only retrieve columns for defined attributes.
* Cache entity metadata in CacheBox.
* Use attribute hash for checking `isDirty`.

## 2.5.0

* Define [custom collections](https://quick.ortusbooks.com/3.0.0/guide-1/collections) per entity.

## 2.4.0

* ~~Apply custom setters when hydrating from the database.~~ (Reverted in `2.5.3` for unintended consequences with things like password hashing.)
* [Query scopes can return any value.](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/query-scopes-and-subselects#scopes-that-return-values)  This allows you to use scopes to perform query functions and return values.  (If you do not want to return a custom value, return the `QueryBuilder` instance or nothing.)
* Improve error messages for not loaded entities.
* Return the correct memento with accessors on.

## 2.3.0

* [Option to ignore non-existent attributes](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/updating-existing-entities#update)

## 2.2.0

* [Relationship Fetch Methods](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/retrieving-relationships) (`first` and `find` methods)

## 2.1.0

* [Subselect Helper](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/query-scopes-and-subselects#subselects)
* [Global Scopes](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/query-scopes-and-subselects#global-scopes)
* [saveMany](https://quick.ortusbooks.com/3.0.0/guide-1/relationships/relationship-types/hasmany#saveMany)
* Mapping foreign keys for relationships is now optional
* Either entities or primary key values can be passed to relationship persistance methods
* Relationships can also be saved by calling `"set" & relationshipName`
* [Virtual Inheritance](https://quick.ortusbooks.com/3.0.0/guide-1/getting-started/defining-an-entity) works on ColdBox 5.2+


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://quick.ortusbooks.com/3.0.0/whats-new.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
