Hi,

The required indexes are automatically created if they don't exist
yet. I will add that to the documentation at
http://www.h2database.com/html/grammar.html#alter_table_add_constraint

You can actually verify what indexes are created using the H2 Console tool.

Regards,
Thomas


On Mon, Nov 16, 2009 at 8:31 AM, Joshua Daniel
<[email protected]> wrote:
> Hi,
>
> Are foreign keys indexed automatically in H2 or do we need to create
> separate indexes for them in our model.
>
> Note: I use JPA entity classes to model tables and I would like to
> know if I need to use @Index annotation (http://docs.jboss.org/
> hibernate/stable/annotations/api/org/hibernate/annotations/Index.html)
> along with @ForeignKey annotation(http://docs.jboss.org/hibernate/
> stable/annotations/api/org/hibernate/annotations/ForeignKey.html) in
> my @ManyToOne child member.
>
> Thanks,
> -jd
>
> --
>
> You received this message because you are subscribed to the Google Groups "H2 
> Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/h2-database?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=.


Reply via email to