Metaprogramming is still a bit new for me, so here is the question:

What would be the cleanest way to implement a parameter-injection into
find() and findAll()?
The idea is to wrap catch every find() and findAll() and inject for
example the User.currentUser's customerId.

So it would be quite safe to .find() whatever the user requests, since
it would only return records belonging to that customer. Since i
already have a trait called Customerize which adds a customer
MappedLongForeignKey to every extended class, i guess this would be
the entry point to start dispatching.

I tried to override findAll() but i basically wound up copying all
code from MetaMapper.scala which wasn't really what i want.

So if anyone has an idea of how to solve this, i'd love to hear it. :)

best regards
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to