Comments (5)
Looks like a bug to me. The two queries per record are what happens when a child gets reload
called on it, you can test it in console. The find(:all)
method used by all
calls reload
on each child to get the attributes that are in child, but not in root.
from citier.
With the fix in pull request #31, only one SELECT query is executed per row. There should still be a way to get all of them using only one query.
from citier.
And with another commit appended to pull request #31, only one query is used per type of needed record! That would leave your specific situation at only two queries: One for selecting the Fruit
s, and one for selecting all of the connected Bananas
.
from citier.
Awesome! Thanks for your work, hope it gets merged soon =)
from citier.
So do I, but until then you can put this in your Gemfile so it gets the citier
gem from my repo:
gem 'citier', :git => 'git://github.com/DouweM/citier.git'
from citier.
Related Issues (20)
- undefined method `create_view' HOT 4
- How to use the latest Citier code? HOT 6
- item.type is deprecated HOT 1
- superclass mismatch for class SQLiteAdapter HOT 4
- Getting citier to work with SQL server
- Citier will not allow a migration for me. HOT 4
- How to suppress the citier logging HOT 1
- Unable to call destroy on Citier subtype HOT 2
- :counter_cache => true support
- relation_methods.rb delete_all strange behavior HOT 2
- View_xxx does not exist | PostgreSQL HOT 2
- Docs need some updating
- Inserting a new inherited class in the middle
- stack level too deep (when changing model inheritance)
- Two level inheritance => fetch issue HOT 1
- update_all raises ActiveRecord::StatementInvalid
- rake db:setup fails on fresh database HOT 1
- Rspec tests failing - stack level too deep error
- STI class not inheriting attributes from citier child class HOT 6
- Two level inheritance, Child Class don't inherit Middle Class attributes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citier.