Quick ORM
4.2.0
4.2.0
  • Introduction
  • Why Quick?
  • What's New?
  • Upgrade Guide
  • Contributing
  • Guide
    • Getting Started
      • Defining An Entity
        • Subclass Entities
      • Retrieving Entities
      • Working with Entities
      • Creating New Entities
      • Updating Existing Entities
      • Deleting Entities
      • Query Scopes and Subselects
    • Relationships
      • Relationship Types
        • hasOne
        • hasMany
        • belongsTo
        • belongsToMany
        • hasManyThrough
        • hasOneThrough
        • belongsToThrough
        • polymorphicBelongsTo
        • polymorphicHasMany
      • Retrieving Relationships
      • Querying Relationships
      • Relationship Counts
      • Ordering By Relationships
      • Eager Loading
    • CBORM Compatibility Shim
    • Collections
    • Custom Getters & Setters
    • Serialization
    • Interception Points
    • Debugging
    • FAQ
  • Cookbook
    • Introduction
    • Dynamic Datasource
  • External Links
    • API Docs
    • Source Code
    • Issue Tracker
Powered by GitBook
On this page
  • 4.2.0
  • 4.1.6
  • 4.1.5
  • 4.1.4
  • 4.1.1, 4.1.2
  • 4.1.0
  • 4.0.2
  • 4.0.1
  • 4.0.0
  • 3.1.7
  • 3.1.6
  • 3.1.5
  • 3.1.4
  • 3.1.3
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.4
  • 3.0.3
  • 3.0.2
  • 3.0.1
  • 3.0.0
  • 2.5.0
  • 2.4.0
  • 2.3.0
  • 2.2.0
  • 2.1.0

Was this helpful?

Edit on Git
Export as PDF

What's New?

PreviousWhy Quick?NextUpgrade Guide

Last updated 4 years ago

Was this helpful?

4.2.0

  • Add a pagination method for quicker performance when total records or total pages are not needed or too slow.

4.1.6

  • Configure columns are no longer cleared when setting up a BelongsToMany relationship.

4.1.5

  • Provide initialThroughConstraints for hasOne relationships (used in *Through relationships).

4.1.4

  • Ignore orders when retrieving a relationship count.

4.1.1, 4.1.2

  • Preserve casted value after saving an entity.

4.1.0

  • Look up returning values by column name not by alias in the ReturningKeyType.

4.0.2

  • Skip eager loading database call when no keys are found.

  • Only apply CONCAT when needed in *Through relationships.

4.0.1

  • Use WHERE EXISTS over DISTINCT when fetching relationships. DISTINCT restricts some of the queries that can be run.

4.0.0

BREAKING CHANGES

Other Changes

  • Give a helpful error message when trying to set relationship values before saving an entity, where applicable.

3.1.7

  • Correct jQuery link in test runner.

3.1.6

  • Allow expressions in basic where clauses.

  • Fix delete naming collision.

3.1.5

  • Add an alias to with to QuickBuilder.

3.1.4

  • Fix a stack overflow on nested relationship checks.

3.1.3

  • Configured tables (.from) are now used for qualifying columns.

3.1.2

  • Remove unnecessary nesting in compare queries.

3.1.1

3.1.0

3.0.4

  • Compatibility updates for ColdBox 6

3.0.3

3.0.2

3.0.1

  • Swap structAppend order for a Lucee bug in mementifier integration.

3.0.0

BREAKING 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.

  • 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.

Other Changes

  • 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.

2.5.0

2.4.0

  • 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.

2.3.0

2.2.0

2.1.0

  • 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

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+

Watch a walkthrough of these changes on CFCasts.
relationship counts
querying relationship methods
HasManyThrough relationships
Bundle Mementifier
API docs
qb 7.0.0
belongsToThrough relationship
HasOneThrough relationship
Ordering by relationship attributes
custom collections
Relationship Fetch Methods
Virtual Inheritance
child entities,
Scopes
querying relationships
eager loading
casting
cast
custom sqltypes
casts="BooleanCast@quick"
Custom Casts
is and isNot
subselects
addSubselect
improvements
Query scopes can return any value.
Subselect Helper
Global Scopes
simplePaginate
Add exists and existsOrFail methods
custom
error
messages
firstWhere
firstOrNew
firstOrCreate
findOrNew
findOrCreate
paginate
hydrating entities
whereHas
whereDoesntHave
has
doesntHave
whereHas
whereDoesntHave
HasOne
asMemento
Upgrade Guide
fill
HasOneThrough
Option to ignore non-existent attributes
discriminated entities.
BelongsToThrough
saveMany
BelongsTo