Fixed regression where eager loading inside a relationship was broken.
Fixed accessing QuickBuilder from entities and relationships.
Set the table when creating new queries.
In 5.0.0, we stepped up the performance of Quick in a major way. Entity creation is now over twice as fast as before.
Average duration to create one entity:
While the times may seem small, this is compounded for each entity you create. So, if you are retrieving 1000 entities, multiply each of these numbers by 1000 and you'll start to see why this matters.
- Added a new
RowIDKeyTypethat will correctly set your primary key if your database only returns
- Fixed a null check in
- Fixed nulls coming back as strings in
- Add a
simplePaginatepagination method for quicker performance when total records or total pages are not needed or too slow.
- Configure columns are no longer cleared when setting up a
hasOnerelationships (used in
- Ignore orders when retrieving a relationship count.
- Preserve casted value after saving an entity.
- Look up returning values by column name not by alias in the
- Skip eager loading database call when no keys are found.
- Only apply
CONCATwhen needed in
DISTINCTwhen fetching relationships.
DISTINCTrestricts some of the queries that can be run.
whereDoesntHavecallbacks now automatically group where clauses when an
ORcombinator is detected.
- Give a helpful error message when trying to set relationship values before saving an entity, where applicable.
- Multiple bug fixes related to subselects and querying relationships when using
- Correct jQuery link in test runner.
- Allow expressions in basic where clauses.
- Add an alias to
- Fix a stack overflow on nested relationship checks.
- Configured tables (
.from) are now used for qualifying columns.
- Remove unnecessary nesting in compare queries.
- Compatibility updates for ColdBox 6
- Drop support for Lucee 4.5 and Adobe ColdFusion 11.
- Virtual Inheritance (using a
quickannotation 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.
defaultGrammarmapping needs to be the full WireBox mapping, including the
@qb, if needed.
- This will allow for other grammars to be more easily contributed via third party modules.
HasManyThroughrelationships now only accept a
relationshipsparameter of relationship methods to walk to get to the intended entity.
- 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.
- Add error message for defaulting key values.
- Add a new QuickBuilder to better handle interop with qb.
loadRelationshipdoesn't reload existing relationships.
- Add multiple retrieve or new/create methods -
- Allow returning default entities for null relations on
- Store the original attributes for later resetting.
parameterLimitsto eager load.
- Use a new entity each time on BaseService.
- Apply sql types for columns to
- Apply global scopes more consistently
- Correctly ignore key column when updating.
hasRelationshipmethod 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
- Only retrieve columns for defined attributes.
- Cache entity metadata in CacheBox.
- Use attribute hash for checking
- Apply custom setters when hydrating from the database. (Reverted in
2.5.3for unintended consequences with things like password hashing.)
- Query scopes can return any value. 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
QueryBuilderinstance or nothing.)
- Improve error messages for not loaded entities.
- Return the correct memento with accessors on.
- 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