Hi,
I'm confused about some scala, which isn't behaving as expected

My code is:

  override def postcodesForSector(sector: PostalSector) = {
    // getEm.flatMap(_.createNamedQuery[Postcode]
("findPostcodesForSector", ("sector" -> sector + "%")))
    val likeString = sector.name + "%"
    //val query = getEm.createNamedQuery[Postcode]
("findPostcodesForSector", "sector" -> likeString)
    //query.findAll
    getEm.findAll[Postcode]("findPostcodesForSector", "sector" ->
likeString)
  }

 getEm returns a ScalaEntityManager

the override is overriding the trait method declaration
  def postcodesForSector(sector: PostalSector) : List[Postcode]




But I'm getting a compiler error
C:\programmingExperiments\scala\domains\JPADemo\src\main\scala\uk\co
\optrak\infrastructure\repository\addresses\uk
\PostcodeRepositoryImpl.scala:28: error: type mismatch;
[WARNING]  found   : java.lang.Object with
scala.collection.jcl.BufferWrapper
[uk.co.optrak.scdomain.addresses.uk.Postcode]
[WARNING]  required: List[uk.co.optrak.scdomain.addresses.uk.Postcode]

I'm using scalajpa 1.1 which says that the findAll method should
return List[A] not ..BufferWrapper[A]

Any suggestions
Thanks
Tim
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to