I'm trying to use a JDO with Google App Engine and Scala. The api for the execute returns Object (but it's really a java collection) and I want to get it into a scala list to iterate over it.
My code looks like this so far:
val pm = PMF.factory.getPersistenceManager
val query = "select from User "
val gamelist:List[User] = List(pm.newQuery(query).execute.toArray:_ *)
The compile error at this point is toArray is not a member of Object. What is the best way to do the above? I tried to use .asInstanceOf[java.util.Collection[User], but it was a failed attempt.