Giter VIP home page Giter VIP logo

Comments (4)

nraychaudhuri avatar nraychaudhuri commented on May 13, 2024

Which version of play are you using? Play used to ship with its own package object models. Duplicate package objects does cause issues

Nilanjan

Sent from my iPhone

On Mar 17, 2013, at 5:36 PM, Michel Daviot [email protected] wrote:

I have this implicit to convert from sql.Date to util.Date

implicit val dateTypeMapper = MappedTypeMapper.base[java.util.Date, java.sql.Date]({ jud => new java.sql.Date%28jud.getTime%29 },
{ jsd => jsd })
When defined in the package object, it compiles, but fails at runtime (when generating the DDL) with a method not found error.

See this gist for the complete source code :https://gist.github.com/tyrcho/5086544

This was initially created in play-slick (playframework/play-slick#32) but it seems more a play issue than a problem with play-slick.


Reply to this email directly or view it on GitHub.

from playframework.

tyrcho avatar tyrcho commented on May 13, 2024

I'm using the latest (2.1). Is it allowed to define a package object
"models" ? Or what is the recommended way to do this ?

On Sun, Mar 17, 2013 at 11:41 PM, Nilanjan Raychaudhuri <
[email protected]> wrote:

Which version of play are you using? Play used to ship with its own
package object models. Duplicate package objects does cause issues

Nilanjan

Sent from my iPhone

On Mar 17, 2013, at 5:36 PM, Michel Daviot [email protected]
wrote:

I have this implicit to convert from sql.Date to util.Date

implicit val dateTypeMapper = MappedTypeMapper.base[java.util.Date,
java.sql.Date]({ jud => new java.sql.Date%28jud.getTime%29 },
{ jsd => jsd })
When defined in the package object, it compiles, but fails at runtime
(when generating the DDL) with a method not found error.

See this gist for the complete source code :
https://gist.github.com/tyrcho/5086544

This was initially created in play-slick (playframework/play-slick#32) but it
seems more a play issue than a problem with play-slick.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/867#issuecomment-15032690
.

from playframework.

jroper avatar jroper commented on May 13, 2024

As Nilanjan said, Play used to ship its own models package object, this has been fixed, but that was since the 2.1 release. For now, you'll have to create your package object in another class. In Play 2.2 you will be allowed to define a package object called models.

from playframework.

tyrcho avatar tyrcho commented on May 13, 2024

Thanks for the super quick answer ! I confirm this works in another package object for play 2.1

from playframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.