Often times, I want to return the IDs from an association only to use it in 
another query.

For example, say you have a many to many like User has many Books.

With association_pks plugin, you can do user.book_pks and get back an 
actual array, but if you are returning potentially 300 IDs and then 
throwing that into another query, that query will get unnecesarily long 
(imagine repeating this a few times).

I noticed that in the association_pks plugin, you are running select_map on 
all your datasets. Perhaps at that last step, we could simple "select' that 
column and create a new method <association>_pks_dataset to just return the 
dataset. 

It wouldn't add a lot of new code/logic, but increase flexibility of that 
plugin.

Thoughts?

Aryk


-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/a0d7d005-7927-474d-9aaf-148fae710e22%40googlegroups.com.

Reply via email to