I'm using rails3.rc and activerecord3 (with meta_where) and just started to switch to sequel, because it seems to be muuuuch faster and offers some really great features :-)
I'm already using the active_model plugin (and some others). But here are some questions I found and which I didn't find any documentation for:
As far as I know, I should use User[params[:id]] instead of User.find(params[:id]). But his doesn't raise if no record exists and doesn't convert the value to an integer (type of PK), so it's as a string in the where clause. I'm not sure if this is causing any performance issues (do all db servers still use keys properly?). Does this harm identity_map? What's the best way to solve these both issues?
Is there an easy way to flip the usage of associations like User.messages_dataset and User.messages? So that User.messages behaves like in AR (=User.messages_data_set). I guess I'd use the #..._dataset a lot but never need the array method, because I could just add .all?
I noticed some same (complex) queries are executed several times within one action sometimes. Is there something like the AR query cache? (identity_map doesn't seem to work for these cases).
Is there a #to_sql I can call to get the raw SQL a dataset would produce?
Thanks for any hints :-)