Module: Torque::PostgreSQL::Associations::ForeignAssociation
- Defined in:
- lib/torque/postgresql/associations/foreign_association.rb
Instance Method Summary collapse
-
#inversed_from(record) ⇒ Object
There is no problem of adding temporary items on target because CollectionProxy will handle memory and persisted relationship.
-
#skip_statement_cache? ⇒ Boolean
The binds and the cache are getting mixed and caching the wrong query.
Instance Method Details
#inversed_from(record) ⇒ Object
There is no problem of adding temporary items on target because CollectionProxy will handle memory and persisted relationship
10 11 12 13 14 15 16 |
# File 'lib/torque/postgresql/associations/foreign_association.rb', line 10 def inversed_from(record) return super unless reflection.connected_through_array? self.target ||= [] self.target.push(record) unless self.target.include?(record) @inversed = self.target.present? end |
#skip_statement_cache? ⇒ Boolean
The binds and the cache are getting mixed and caching the wrong query
19 20 21 |
# File 'lib/torque/postgresql/associations/foreign_association.rb', line 19 def skip_statement_cache?(*) super || reflection.connected_through_array? end |