Last updated
Last updated
Respect qb's support options.
Handle skipping constraints when a relationship is defined with other relationships
Make the withoutRelationshipConstraints
check more resilient by checking against a set of relationship method names.
The withoutRelationshipConstraints
method now requires the relationship method name as the first parameter.
This is used to ensure only the desired relationship has its constraints skipped. This is especially important in asynchronous contexts.
Fix for thread safety when loading multiple relationships off of a single entity
Fix qualifying column issue when using HasManyDeep
relationships.
Remove duplicate join from addCompareConstraints
when using HasManyDeep
relationships.
Upgrade to latest str dependency
Introduced a new alternative relationship to the old hasManyThrough
— hasManyDeep
. It produces more readable, parsable SQL and is the basis for the new version of hasManyThrough
.
If you prefer the hasManyDeep
syntax over the hasManyThrough
syntax, you might enjoy the HasManyDeepBuilder
, a builder object to create the hasManyDeep
relationship. It is generally more readable, especially when using additional constraints on related or through entities, at the cost of verbosity.
Use the interceptor approach instead of wirebox:targetId
to support CommandBox 5.
Fix where discriminated entities could use the wrong qualified column name in the join with the parent entity.
Return optional QuickBuilder instances for withCount
and withSum
to allow for further chaining.
Fix clearAttribute
when not setting to null
.
Fix using a QueryBuilder instance to define a subselect.
Add test case for checking null attributes on newly created entities.
Add test case for deleteAll
off of a hasMany
relationship.
Add test case for belongsToMany
withCount
.
Add test case for firstOrNew
with aliases and columns.
Correctly handle null values with casted attributes.
QuickBuilder
now has its own clone
method that behaves as you would expect. Previously, it only cloned the enclosed QueryBuilder
which was not that useful.
Making this fix required the newQuery
method of QuickBuilder
to return an instance of QuickBuilder
instead of QueryBuilder
as it previously was. If you need a new QueryBuilder
instance from a QuickBuilder
, use the newQuickQB
method.
Allow a QuickBuilder to be used wherever a QueryBuilder can be used.
asQuery
methodThis method is similar to asMemento
. You use it when the return format you want is an array of structs. asQuery
will skip creating entities at all, instead returning the values straight from qb. This can result in a large performance boost depending on the number of records being returned. Additionally, asQuery
supports returning the columns using the alias names and returning eager loaded entities.
Add compatibility with ColdBox 7.
Fixed a bug where once a virtual attribute was added to an entity it was added to all future entities of that same type.
Dropped support for ColdBox 5.
Use correct nesting for where statements
Fixed retrieving null
values from fields and relationships
Special handling for Lucee generated keys
Workaround for adobe@2021 not supporting null values in param statements
Upgrade to latest cfmigrations (v4.0.0)
Add a way to not fire events inside a callback using withoutFiringEvents
.
Upgrade to qb 9
HasOneOrManyThrough: Fix too many joins for has
and whereHas
HasOneOrManyThrough: Fixed applying of through constraints BaseEntity: Use wirebox to get the util to work in CommandBox
Fix bad link to Getting Started guide
Use existing builder when adding subselects
Update to latest mementifier (v3.0.0)
CommandBox compatibility
Force generated key to be an integer.
CommandBox-friendly injections using the box
namespace.
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.
Fixed a null check in isNullValue
.
Fixed nulls coming back as strings in JsonCast
.
Configure columns are no longer cleared when setting up a BelongsToMany
relationship.
Provide initialThroughConstraints
for hasOne
relationships (used in *Through
relationships).
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 ReturningKeyType
.
Skip eager loading database call when no keys are found.
Only apply CONCAT
when needed in *Through
relationships.
Use WHERE EXISTS
over DISTINCT
when fetching relationships. DISTINCT
restricts some of the queries that can be run.
Give a helpful error message when trying to set relationship values before saving an entity, where applicable.
Correct jQuery link in test runner.
Allow expressions in basic where clauses.
Fix delete
naming collision.
Add an alias to with
to QuickBuilder.
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
Swap structAppend order for a Lucee bug in mementifier integration.
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.
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.
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.
Ensure loadRelationship
doesn't reload existing relationships.
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
.
Apply custom setters when hydrating from the database. (Reverted in 2.5.3
for unintended consequences with things like password hashing.)
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
All hasManyThrough
relationships are now hasManyDeep
relationships under the hood. No code changes should be necessary for you to enjoy more readable SQL, less bugs, and greater performance.
Allow setting for the underlying qb instance backing Quick.
Pin to version 3.
Add a method, similar to for quickly adding a subselect based on the sum of a relationship's attribute.
Add the ability to .
Read more in the docs.
Add include and exclude arguments to method.
Always return numeric value for .
Add the builder to the preInsert
method for .
Added support for with discriminated subclass entities.
This did introduce one breaking change from v4. See the for more information.
Added a new that will correctly set your primary key if your database only returns ROWID
in the queryExecute
response.
Add a pagination method for quicker performance when total records or total pages are not needed or too slow.
Allow for including
📹
, , and callbacks now automatically group where clauses when an OR
combinator is detected.
Dynamically add to a parent entity without loading all of the relationship.
Multiple bug fixes related to and when using belongsToThrough
, hasOneThrough
, or hasManyThrough
.
Fix when using "OR" combinators.
Add support for JSON using a new JsonCast@quick
component.
Optimize caching
Apply during .
Account for null values in .
Please see the for more information on these changes.
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 .
for memento transformations.
Use to automatically convert queries to mementos.
Automatically-generated .
Update to .
Add a .
Add a .
- using custom components to represent one or more attributes.
.
.
.
Allow for orFail
methods.
Add multiple retrieve or new/create methods - , , , , and .
Add to Quick.
Add to compare entities.
Allow from serialized data.
Allow returning default entities for null relations on , , , and relationships.
Query relations using , , , and .
Define per entity.
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.)
(first
and find
methods)
works on ColdBox 5.2+
adobe@2018
7.65 ms
3.71 ms
adobe@2021
6.68 ms
2.10 ms
lucee@5
3.94 ms
0.88 ms