Regular |
|
Joined: Mon Feb 23, 2004 10:42 pm Posts: 102 Location: Washington DC
|
Hibernate version:
3.0 Beta 1
Mapping documents:
<dynamic-class entity-name="file" table="citf2" mutable="false">
<id name="recordId"
column="record_id"
type="long"
access="org.progeeks.meta.hibernate.MetaObjectAccessor">
<generator class="native" />
</id>
<property name="fileName"
column="fileName"
type="string"
length="255"
insert="false"
update="false"
access="org.progeeks.meta.hibernate.MetaObjectAccessor"/>
<property name="filePath"
column="filenamePath"
type="string"
length="255"
insert="false"
update="false"
access="org.progeeks.meta.hibernate.MetaObjectAccessor"/>
<property name="type"
column="valType"
type="string"
length="100"
insert="false"
update="false"
access="org.progeeks.meta.hibernate.MetaObjectAccessor"/>
<property name="value"
column="typeValue"
type="string"
length="255"
insert="false"
update="false"
access="org.progeeks.meta.hibernate.MetaObjectAccessor"/>
<property name="driveId"
column="hdId"
type="string"
length="255"
insert="false"
update="false"
access="org.progeeks.meta.hibernate.MetaObjectAccessor"/>
</dynamic-class>
Code between sessionFactory.openSession() and session.close():
Query q = session.createQuery( "from file f where f.value=:value" );
q.setParameter( "value", emailMetaObject.getProperty( "value" ) );
Iterator i = q.iterate();
while( i.hasNext() )
{
System.out.println( i.next() );
}
------------------------------
I just upgraded from the 3.0 Alpha to the Beta 1 version, and am now noticing that the Query.iterate returns proxy objects instead of actual objects? Is there a specific reason for this?
-Matt
_________________ Matt Veitas
|
|