Inheriting JPA annotations from a trait, Scala 2.8.0

View: New views
3 Messages — Rating Filter:   Alert me  

Inheriting JPA annotations from a trait, Scala 2.8.0

by rossputin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Guys.

We are trying to inherit JPA annotations from a trait so all our entities can share several fields.  While the fields are picked up, the annotations are not.  Therefore we cannot set unique constraints on the table etc etc, furthermore the columns in the table are named as per the fields, not the annotations.

Is this feasible.. how should we do it?

Thanks for your help,

 -- Ross

Re: Inheriting JPA annotations from a trait, Scala 2.8.0

by rossputin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

Just an update, this seems to be fixed with the latest snapshot.

Cheers,

Ross

rossputin wrote:
Hi Guys.

We are trying to inherit JPA annotations from a trait so all our entities can share several fields.  While the fields are picked up, the annotations are not.  Therefore we cannot set unique constraints on the table etc etc, furthermore the columns in the table are named as per the fields, not the annotations.

Is this feasible.. how should we do it?

Thanks for your help,

 -- Ross

Re: Inheriting JPA annotations from a trait, Scala 2.8.0

by Lukas Rytz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes, that was http://lampsvn.epfl.ch/trac/scala/ticket/2511

On Mon, Nov 16, 2009 at 13:06, rossputin <rossajmcd@...> wrote:

Hi.

Just an update, this seems to be fixed with the latest snapshot.

Cheers,

Ross


rossputin wrote:
>
> Hi Guys.
>
> We are trying to inherit JPA annotations from a trait so all our entities
> can share several fields.  While the fields are picked up, the annotations
> are not.  Therefore we cannot set unique constraints on the table etc etc,
> furthermore the columns in the table are named as per the fields, not the
> annotations.
>
> Is this feasible.. how should we do it?
>
> Thanks for your help,
>
>  -- Ross
>

--
View this message in context: http://old.nabble.com/Inheriting-JPA-annotations-from-a-trait%2C--Scala-2.8.0-tp26160121p26370761.html
Sent from the Scala - User mailing list archive at Nabble.com.