You can just do Model.find(classOf[User], userId) and the type on the method
will be inferred. Any time you see a Class[A] parameter, it wants the result
of a classOf[...].

Derek

On Tue, Oct 14, 2008 at 5:52 PM, Charles F. Munat <[EMAIL PROTECTED]> wrote:

>
> A question from the JPADemo...
>
> How does one use this:
>
> def find[A](clazz: Class[A], id: Any) =
>   em.find[A](clazz, id).asInstanceOf[A]
>
> If I have a User model and I want to use find on the EntityManager, what
> goes where the *** is below:
>
> val user = Model.find[User]( ***, userId)
>
> Thanks,
>
> Chas.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to