Load information from package-info.java

Bug #555426 reported by Marcos Silva Pereira
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
play framework
Fix Committed
Medium
Nicolas Leroux
1.0
Won't Fix
Medium
Nicolas Leroux
1.1
Fix Committed
Medium
Nicolas Leroux

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.

Changed in play:
status: Confirmed → Won't Fix
milestone: 1.0.4 → 1.1
status: Won't Fix → Fix Committed
Revision history for this message
Michael Boyd (mic-t-boyd) wrote :

Is there a way to see what code revision links to this bug? I looked through the revisions but can't find it.

Revision history for this message
Guillaume Bort (guillaume-bort) wrote : Re: [Bug 555426] Re: Load information from package-info.java

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>

Revision history for this message
Nicolas Leroux (nicolas-lunatech) wrote :

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.
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.