Comments (4)
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.
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 issuesNilanjan
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/5086544This 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.
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.
Thanks for the super quick answer ! I confirm this works in another package object for play 2.1
from playframework.
Related Issues (20)
- Caffeine cache API has inconsistent behavior with differing types and between sync/async HOT 1
- play hangs on console interacton when using jblas library HOT 4
- 2.9 with Scala 2.13 not supporting pack4j 6.00 dependency :Jackson Data-bind 2.15.x
- Documentation spelling fix HOT 3
- Scala 3.3.2: class file ... is broken, reading aborted with `class java.util.NoSuchElementException` `contextual$` HOT 9
- Replace `3.0.x` with next version HOT 5
- SSL certificate for www.playframework.com is expired HOT 2
- Search in documentation does not work HOT 1
- Support for Partitioned cookie attribute (AKA CHIPS) / make cookies more flexibel HOT 1
- Asset changes in subprojects HOT 2
- Recommend Scala Metals + VSCode as an IDE on this page: https://www.playframework.com/documentation/2.9.x/IDE HOT 1
- Timeout issue when using AsyncCacheApi and custom http filter HOT 2
- [2.8.20] CVE-2023-44487 in akka-http-core HOT 1
- Support for Application Secret rotation
- play 2.9 is trying to fetch guice-6.0.0-no_aop jar, caused not found error HOT 6
- Play gradle plugin fails to create playRun task when no compileScala task found in a project
- Dependency Dashboard
- Apache Pekko doesn't support autogenerated TLS certs HOT 1
- Application secret from env variable does not work HOT 3
- UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playframework.