Hello,

I have two databases, db1 (a.k.a. Motorbike) and db2 (a.k.a. Motorway)
defined with RequestVarEM :
- object ModelDb1 extends LocalEMF("db1") with RequestVarEM  // Motorbike
database
- object ModelDb2 extends LocalEMF("db2") with RequestVarEM  // Motorway
database

I thought one could access to any databases independently from any snippet
as long as the correct Model object were used (ModelDb1 or ModelDb2 for
exemple) ; but when I access both databases from the same page, the second
database access issues a "Named query not found" exception.

I have two snippets, one to display a list of "motorbike", another to
display a list of "motorway" :
- page1 :
ModelDb1.createNamedQuery[Motorbike]("Motorbike.findAll).getResultList() =>
ok
- page2
: ModelDb2.createNamedQuery[Motorway]("Motorway.findAll).getResultList() =>
ok
- page3 : calling from page 3 motorbike & motorway snippets : Named query
not found: Motorway.findAll
- page4 : calling from page 4 motorway & motorbike snippets : Named query
not found: Motorbike.findAll
- page3 & changing the query of *Motorway* snippet :
  - ModelDb2.createNamedQuery[*Motorbike*]("*Motorbike*.findAll).getResultList()
=> it's ok and I do NOT have an exception !

I joined a sample application, ...

any idea about this issue ?
(bad use of LocalEMF in the application code ? issue with LocalEMF or
RequestVarEM ?)

Jean-Luc

PS : I don't know if it's related but I have this in the log :
[INFO] Checking for multiple versions of scala
[WARNING] Multiple versions of scala libraries detected!



-- 
Jean-Luc Canela
jlcane...@gmail.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@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
-~----------~----~----~----~------~----~------~--~---

Attachment: mytest.tgz
Description: GNU Zip compressed data

Reply via email to