Comment 3 for bug 555426

Revision history for this message
Nicolas Leroux (nicolas-lunatech) wrote : Re: [Bug 555426] Re: Load information from package-info.java

Actually there was a fix ;)

http://bazaar.launchpad.net/%7Eplay-developers/play/1.1-unstable/revision/946

Nicolas

On Oct 3, 2010, at 1:52 PM, Guillaume Bort wrote:

> There is no special fix, just an update of the eclipse compiler.
>
> On Sun, Oct 3, 2010 at 12:33 PM, Michael Boyd <email address hidden> wrote:
>> Is there a way to see what code revision links to this bug? I looked
>> through the revisions but can't find it.
>>
>> --
>> Load information from package-info.java
>> https://bugs.launchpad.net/bugs/555426
>> You received this bug notification because you are subscribed to play
>> framework.
>>
>
>
> --
> Guillaume Bort, http://guillaume.bort.fr
>
> For anything work-related, use <email address hidden>; for everything else,
> write <email address hidden>
>
> --
> Load information from package-info.java
> https://bugs.launchpad.net/bugs/555426
> You received this bug notification because you are a bug assignee.
>
> Status in play framework: Fix Committed
> Status in play framework 1.0 series: Won't Fix
> Status in play framework 1.1 series: Fix Committed
>
> Bug description:
> While using plain Hibernate you can place TypeDef at the class or package level:
>
> http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html#d0e2282
>
> This is usefull to avoid mapping the custom type every time you need to use it. Per instance, I can create a package-info.java file where I place all type defs, named queries, filter defs and some other stuff. Currently, while using play, I can't figure out how to use package definitions. I try to create app/models/package-info.java class and use the definitions placed there, but I get the following error message when application starts:
>
> A JPA error occured (Unable to build EntityManagerFactory): Could not determine type for: datetime, at table: courses, for columns: [org.hibernate.mapping.Column(createdAt)]
>
> So I try to configurate the jpa.entities like below:
>
> jpa.entities = models
>
> And then I get the following log message:
> 12:00:34,414 WARN ~ JPA -> Entity not found: models
>
> It will be good if play automatically loads package-info files when they exists.
>