Hi,
I dont know, do I have to use the jboss plugin if I work with Hibernate? As
I said I would like to use hibernate and in one java class I used @Entity
and @Id to specify the mapping. But the compiler complains. I have set the
version to 1.5 already, then I found here in the forum some questions about
hiobernate but always the other hibernate configuration way is used with xml
files. Now I am wondering if there is any way to use the annotations in java
files. Maybe is some special setting necessary?
Here is an example:
....
@Entity
@Table(name="user")
public class User implements Serializable{
@Id
@GeneratedValue(generator="uuid-gen")
@GenericGenerator(name="uuid-gen", strategy="uuid")
public String getUserid() { return this.userid;}
....
Have a nice day,
juergen
Eric Redmond wrote:
>
> Annotations are supported, but you have to set the correct version. The
> JBoss packaging plugin supports hibernate, but defaults to 2.1. If you set
> the version to 3.0 it will work. I don't know what plugin you are using,
> however, so I'd check the plugin's docs.
>
> Eric
>
> On 12/27/06, juergen.schumacher <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi,
>> I tried to use the annotations inside my classes for hibernate like
>> @Entity,
>> @Id, .... but the compiler during the maven build complains. Now I found
>> a
>> maven hibernate plugin but here I still have to use the XML file instead
>> of
>> annotations. Am I right that annotations not supported?
>>
>> Have a nice day,
>> Juergen
>> --
>> View this message in context:
>> http://www.nabble.com/Annotation-%40Entity-tf2887173s177.html#a8066007
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Eric Redmond
> http://codehaus.org/~eredmond
>
>
--
View this message in context:
http://www.nabble.com/Annotation-%40Entity-tf2887173s177.html#a8082456
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]