|Re: [Teneo] 2 Configuration Questions [message #423296 is a reply to message #423293]
||Fri, 26 September 2008 12:18
| Martin Taal
Registered: July 2009
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:
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
Neil Brennan wrote:
> 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?
With Regards, Martin Taal
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: firstname.lastname@example.org - email@example.com
Web: www.springsite.com - www.elver.org
Powered by FUDForum
. Page generated in 0.01964 seconds