ORM Querying Guide Writing SELECT statements for ORM Mapped Classes Selecting ORM EntitiesSelecting Individual AttributesSelecting ORM AliasesSelecting Entities from Subqueries Joins Chaining Multiple JoinsJoins to a Target with an ON ClauseUsing Relationship to join between aliased targetsJoining to Subqueries along Relationship pathsSetting the leftmost FROM clause in a join EXISTS forms: has() / any() Writing SELECT statements for Inheritance Mappings Using selectin_polymorphic() Applying selectin_polymorphic() to an existing eager load Using with_polymorphic() Using aliasing with with_polymorphic Joining to specific sub-types or with_polymorphic() entities SELECT Statements for Single Inheritance Mappings Inheritance Loading API ORM-Enabled INSERT, UPDATE, and DELETE statements Getting new objects with RETURNINGBulk INSERT for Joined Table InheritanceLegacy Session Bulk INSERT Methods ORM Bulk UPDATE by Primary Key Legacy Session Bulk UPDATE Methods Selecting a Synchronization StrategyUPDATE/DELETE with Custom WHERE Criteria for Joined Table Inheritance Column Loading Options Using load_only() to reduce loaded columnsUsing raiseload to prevent deferred column loads Using deferred() for imperative mappers, mapped SQL expressionsLoading deferred columns in groupsUndeferring on wildcards Loading Arbitrary SQL Expressions onto Objects Column Loading API deferred()load_only()undefer_group() ORM API Features for Querying ORM Execution Options AutoflushIdentity Token The Query Object ORM-Specific Query Constructs