playframework/Play20 — pull request #905 by phidias (2013-03-25 17:18:41+00:00)
Title: anorm.Pk case is not handled by anyParameter method

Hi,

I'm sending a pull request that fixes a little bug that happens when you want to pass a Pk object (stored as Any) as parameter to an SQL query:

val id : Any = Id(5)
SQL("SELECT * FROM cities WHERE id = {id}").on('id -> id)

This doesn't work properly because when the parameter is of type Any, it goes through the [anyParameter](https://github.com/playframework/Play20/blob/master/framework/src/anorm/src/main/scala/anorm/Anorm.scala#L325) method which does not handle anorm.Pk objects. When the parameter is of type Pk then it's fine cause it's handled by [pkToStatement](https://github.com/playframework/Play20/blob/master/framework/src/anorm/src/main/scala/anorm/Anorm.scala#L355).

**Note: ** This is my first pull request so I'm not sure if I have followed all the guidelines. The code compiles & doesn't seem to be breaking any of the tests.

Thanks!