Is there a simple way in JPA/Lift to query to retrieve a single object
from the database, assign it to a val if found, or create a new object
of that type and assign it instead of there is no such object in the
database?
Sort of a...
val user: User =
Model.createNamedQuery(
"findUserByUsername",
"username" -> "hal"
).findOr(new User())
or something like that? That would be very useful.
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
-~----------~----~----~----~------~----~------~--~---