VictorArgentin
VictorArgentin

Reputation: 433

Grails Hibernate annotations

Can any1 explain me what hibernate annotations are for? I'm learning hibernate/grails and can't understand what it does. Check here: http://grails.org/doc/1.0.x/guide/15.%20Grails%20and%20Hibernate.html.

Upvotes: 1

Views: 425

Answers (2)

Dónal
Dónal

Reputation: 187499

Hibernate annotations are an alternative way to map your domain classes to the database. Generally, they should only be used if you have an existing Hibernate-annotated domain model that you want to use in a Grails app.

If you don't already have an existing domain model, then using the default GORM conventions is a more convenient way to map your domain classes to the database.

Upvotes: 3

axtavt
axtavt

Reputation: 242686

Hibernate annotations are used to configure object-relational mapping of your objects, i.e. they define how your objects are persisted into the database. You can find more info on using them in the Hibernate documentation.

Upvotes: 0

Related Questions