-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: MapProxy
PostPosted: Tue Jan 18, 2005 1:19 pm 
Regular
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2005 2:15 pm 
Regular
Regular

Joined: Mon Feb 23, 2004 10:42 pm
Posts: 102
Location: Washington DC
Another note...using something like the scroll() or list() methods on Query do not return the MapProxy

_________________
Matt Veitas


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.