-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to run performance tests with benchmark #50
Comments
It looks like I need to add this to the README, but you'll want to add this line to For a little background: The |
Thanks Jamie, I will try that and let you know how this goes. One more question- and apologies if I have been asking too many. Probably no point in opening a new ticket: but It is about indexes. I have specified fields in the mapper files that I want the indexes to be set on. I know I need to reindex! at some point but not sure when this needs to be done. I have created a table and reindexed right after a table was created but as I look at my database in PgAdmin it doesn't look like any indexes have been applied. Any idea why this is not working for me? Thanks :) |
If no indexes are being added, that's definitely a bug. The idea behind The indexing code is not my favorite part of either this gem or Which mapper is it so I can try to replicate the bug? |
Have a look at the Document mapper - I tried to add an index on the project and revision date . I try to reindex when I run a script that creates the tables (find it in folder script as for example db_script_small.rb). |
I had a look at your |
Thanks for having a look. I will wait for that My last question would be- I cannot find a join method. Are you planning on adding it? |
I am, but it'll require quite a bit of work with the query parser. For example, given the following mappers: Perpetuity.generate_mapper_for Article do
# ...
attribute :author, type: Person
end
Perpetuity.generate_mapper_for Person do
attribute :name, type: String
end What I'd like to do is to automatically do a join when you query based on another object's attributes: Perpetuity[Article].select { |article| article.author.name == 'Jamie' } This doesn't work yet for the Postgres adapter, but it does with the MongoDB adapter when embedding objects. When I implement joins, you'll be able to do queries like that. Since it will have the author loaded with |
Hi ,
I am trying to run rake test:benchmark which works with ActiveRecod but when I use it with Perrpetuity gem I get uninitialized constant Perpetuity::RailsModel (NameError). I tried adding 'require perpetuity' to the top of the test but it looks like it is not as simple. Is this something that can be fixed with minimal effort?
The text was updated successfully, but these errors were encountered: