[Teneo] 2 Configuration Questions [message #423293] |
Fri, 26 September 2008 08:00  |
Eclipse User |
|
|
|
Hi,
Just a couple of configuration questions.
1. According to http://www.elver.org/hibernate/hibernate_details.html#Lazy
+loading%2Ffetching%2C+Proxy ELists are lazily loaded. Is there any way
to make this not be the case? We have several instances in which greedy
loading would be vastly preferable.
2. According to http://www.elver.org/hibernate/
hibernate_details.html#Automatic+creation+of+tables%2FDataba se+Schema An
option can be used to control if the database schema should be updated
when a new HbDataStore is created. Just to confirm, is this the option
now replaced by hibernate.hbm2ddl.auto?
Regards,
Neil
|
|
|
Re: [Teneo] 2 Configuration Questions [message #423296 is a reply to message #423293] |
Fri, 26 September 2008 08:18  |
Eclipse User |
|
|
|
Hi Neil,
1) there are two ways:
PersistenceOptions.FETCH_CONTAINMENT_EAGERLY: if you set this option to true then all containment
relations are fetched eagerly.
or set the fetch=EAGER attribute using OneToMany and ManyToMany annotations:
@OneToMany(fetch=EAGER).
ManyToOne and OneToMany are normally fetch eagerly, only if you do SET_PROXY=true then these are set
to lazy, which can be overridden by setting the annotation:
@ManyToOne(fetch=EAGER) or @OneToOne(fetch=EAGER)
2) correct was replaced by the hbm2ddl.auto param
gr. Martin
Neil Brennan wrote:
> Hi,
>
> Just a couple of configuration questions.
>
> 1. According to http://www.elver.org/hibernate/hibernate_details.html#Lazy
> +loading%2Ffetching%2C+Proxy ELists are lazily loaded. Is there any way
> to make this not be the case? We have several instances in which greedy
> loading would be vastly preferable.
>
> 2. According to http://www.elver.org/hibernate/
> hibernate_details.html#Automatic+creation+of+tables%2FDataba se+Schema An
> option can be used to control if the database schema should be updated
> when a new HbDataStore is created. Just to confirm, is this the option
> now replaced by hibernate.hbm2ddl.auto?
>
> Regards,
>
> Neil
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03991 seconds