users@jaxb.java.net

Re: Please Help (hibernate annotations in schema classes..)

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Sat, 9 Jan 2010 14:47:42 +0100

Hi,

> I was able to atlast able to add the annotations to my classes.
> But, how can I add some annotation specific proerties... like  @Indexed(
> name = "item").
>
>                   <jaxb:bindings node="xs:element[@name='item']">
>                         <annox:annotate target="field">
>                             <annox:annotate
> annox:class="org.hibernate.search.annotations.Field" annox:name="item" />
>                         </annox:annotate>
>                     </jaxb:bindings>
>
> Instead of annox:name , jsut "name = item" doest work..

It does.

<annox:annotate>
                <annox:annotate annox:class="org.hibernate.search.annotations.Field"
name="item"/>
</annox:annotate>

produces:

        @Field(name = "item")

Make sure you do not mistake @Field with @Indexed. @Indexed does not
have the "name" attribute.

>
> Also is there any documentation for this Annotations Plugin??  (I tried
> finding )so that I will come to know the different types of usages or
> options that I can set

Google gives the following link as the second result for the "annotate
plugin" query:

http://confluence.highsource.org/display/J2B/Annotate+Plugin


See also:

http://confluence.highsource.org/display/ANX/User+guide

Bye.
/lexi