-->
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.  [ 13 posts ] 
Author Message
 Post subject: Can I access ref'd object's db id w/o db access?
PostPosted: Tue May 31, 2005 8:52 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
Hibernate version: 3.0.3

Consider the following code fragment:
Code:
class A
{  int id // database generated id
    B refB; //lazy=true
    C refC; //lazy=true 
    ...
}
class B { int id; // database generated id ...}
class C{ int id; // database generated id ...}


All of these classes have a surrogate key, generated by Hibernate.

Is it possible to obtain a referenced object db identifier (eg. the B and C
references in an instance of A) without loading it from the database? (eg. the following
Code:
List aList = session.createQuerty("from A").list();
Iterator it = aList.iterator();
A a  = (A)it.next();
int bID = ... <<=== what do I place here?


The use case is fetching a set of A's from the database but not following
the links to the referenced objects. Hibernate does the correct thing and
will only resolve the references upon accessing these references, but I
actually *want* the key values and would like to get them from Hibernate
without accessing the database.
My reasoning is that these database ids already are loaded with the object
and stored somewhere by Hibernate, so I would like access to them.

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 7:51 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
Since no one replied, I thought I'll ask again, perhaps sheding some more
information about the use case I have.

The application all this applies to is a a typical n-tier with the Hibernate
application being remote from the clients. The object model is a rather
interconnected object graph. When issuing a query for whatever domain
model objects, in 95% of the cases, the retrieved objects contain
refrences to other objects, and maybe collections of other objects.
Hibernate does the right thing on the first query through the requested
objects and returns proxy objects for those references and collections.

For most of the request from clients (in particular the web ui), the list
of selected objects is all that's required, and perhaps the database id
values of some of these references, in order to build links. Since the
client is remote, the returned objects (from the query) need to be
converted to some DTO version of these objects. This is where I would
like to be able to save on the subsequent database access when
attempting to get the database ids of referenced objects (I'm sure
Hibernate has access to these).

Is there a way to do this? Should I not even attempt since there's a
much better way to save the database access calls (and not retrieve
half my object model into memory in the process) which people are willing
to share?

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2005 5:03 am 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
bump

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2005 5:21 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
map the fkId as a simple unmutable property too.

Next time, stop bumping please

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 05, 2005 6:17 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
anthony wrote:
map the fkId as a simple unmutable property too.

Next time, stop bumping please

First sorry about the bump - it just seemed that someone might just know
how to do this.

As for the problem I have - can I have it both ways? ie. can I get Hibernate
to retrieve the object when I reference the actual POJO behind the FK and
also have a mechanism for obtaining he FK value from the referring object
w/o having Hibernate loading it from the DB?

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 05, 2005 6:19 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
foo.getId() does NOT cause foo to be fetched


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 06, 2005 10:04 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
gavin wrote:
foo.getId() does NOT cause foo to be fetched

No that's true, but if foo contains a reference to bar, then attempting to
do foo.getBar().getId() will cause a fetch though all I want is the id itself,
not bar. So is there a way to do something like foo.getBarId() (in its effect
not as an actual method or interface, of course).

I'm trying to build DTOs where these references have the referred to object
ids to allow the a client to then request this referred to object using
a separate request. The reasoning behind this relate to the fact that this
is a legacy system and it has to work this way ;).

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 12:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
bonnyr wrote:
gavin wrote:
foo.getId() does NOT cause foo to be fetched

No that's true, but if foo contains a reference to bar, then attempting to
do foo.getBar().getId() will cause a fetch though all I want is the id itself,
not bar.


This is NOT true. Instead of arguing with me, actually try it out.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 6:30 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
Gavin,
gavin wrote:
This is NOT true. Instead of arguing with me, actually try it out.


Thanks for the prompt reply.
I have indeed tried to perform this using the following:
* IGRPair ip1 = (IGRPair) getSession().get(IGRPair.class, ipID)
* IGRPair ip2 = (IGRPair) getSession().createQuery("from IGRPair where pairID = 17").uniqueResult();
.

UserClass has two references to instances of another class.

In both cases, there are 4 queries shown in the log as a result of the get
operation and all the objects reachable from a UserClass instance are
available.

The mapping document below shows the way the class is mapped:
Code:
    <class name="IGRPair" table="IGRPair" discriminator-value="IGRP">


        <many-to-one name="igrA" class="IGR" column="IGR_A_ID" lazy="true"/>
        <many-to-one name="igrB" class="IGR" column="IGR_B_ID" lazy="true"/>
        <property name="pairID" type="int" column="PAIR_ID"/>
    </class>


What am I doing wrong then?

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 6:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I have no idea what you are doing wrong. That is what your debugger is for.

I of course have unit test for this, so I know it works.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 6:42 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
gavin wrote:
I have no idea what you are doing wrong. That is what your debugger is for.

I of course have unit test for this, so I know it works.


Given the mapping fragment in my post above, this should not happen,
as you state.
As for solving this, are you suggesting I delve into Hibernate
with the debugger to trace what's happening? Would you be so kind as to
at least let me know where to look for this behaviour?

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 6:57 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Note that of course this functionality does not apply if you have access="field" on your identifer property.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 7:08 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
gavin wrote:
Note that of course this functionality does not apply if you have access="field" on your identifer property.


I checked the mapping for the identifier property:
Code:
        <id name="id" type="int" column="ID" unsaved-value="-1"> <generator class="sequence"/> </id>


Here's a debug dump of running the query. You can clearly see that the
entity association are being resolved by loading from the db.

A point of interest (maybe) is that these objects are all derived from a
base class and mapped using table per class hierarchy, but there's also
a mapping (in another class not used here at all) that contains polymorphic rererences to instances of all these classes using an <any>.
I would not have thought this makes a difference, but....

Thanks again for your input.



08:57:14,640 DEBUG main org.hibernate.impl.SessionImpl - find: from IGRPair where pairID = 17
08:57:14,640 DEBUG main org.hibernate.engine.QueryParameters - named parameters: {}
08:57:14,640 DEBUG main org.hibernate.hql.ast.QueryTranslatorImpl - parse() - HQL: from app.model.beans.IGRPair where pairID = 17
08:57:14,671 DEBUG main org.hibernate.hql.AST - --- HQL AST ---
\-[QUERY] 'query'
+-[SELECT_FROM] 'SELECT_FROM'
| \-[FROM] 'from'
| \-[RANGE] 'RANGE'
| \-[DOT] '.'
| +-[DOT] '.'
| | +-[DOT] '.'

...


| | | | \-[IDENT] 'app'
| | | \-[IDENT] 'model'
| | \-[IDENT] 'beans'
| \-[IDENT] 'IGRPair'
\-[WHERE] 'where'
\-[EQ] '='
+-[IDENT] 'pairID'
\-[NUM_INT] '17'

08:57:14,671 DEBUG main org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
08:57:14,671 DEBUG main org.hibernate.hql.antlr.HqlSqlBaseWalker - query() << begin, level = 1
08:57:14,671 DEBUG main org.hibernate.hql.ast.FromElement - FromClause{level=1} : app.model.beans.IGRPair (no alias) -> igrpair0_
08:57:14,671 DEBUG main org.hibernate.hql.ast.FromReferenceNode - Resolved : pairID -> igrpair0_.PAIR_ID
08:57:14,671 DEBUG main org.hibernate.hql.antlr.HqlSqlBaseWalker - query() : finishing up , level = 1
08:57:14,687 DEBUG main org.hibernate.hql.ast.HqlSqlWalker - processQuery() : ( SELECT ( FromClause{level=1} IGR_PAIR igrpair0_ ) ( where ( = igrpair0_.PAIR_ID 17 ) ) )
08:57:14,687 DEBUG main org.hibernate.hql.ast.HqlSqlWalker - Derived SELECT clause created.
08:57:14,687 DEBUG main org.hibernate.hql.ast.JoinProcessor - Using FROM fragment [IGR_PAIR igrpair0_]
08:57:14,687 DEBUG main org.hibernate.hql.antlr.HqlSqlBaseWalker - query() >> end, level = 1
08:57:14,703 DEBUG main org.hibernate.hql.AST - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (IGR_PAIR)
+-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
| +-[SELECT_EXPR] SelectExpressionImpl: 'igrpair0_.ID as ID' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=IGR_PAIR,tableAlias=igrpair0_,colums={,className=app.model.beans.IGRPair}}}
| \-[SQL_TOKEN] SqlFragment: 'igrpair0_.VERSION as VERSION9_, igrpair0_.NAME as NAME9_, igrpair0_.CONFIG_STATE as CONFIG5_9_, igrpair0_.PROJECT_ID as PROJECT6_9_, igrpair0_.IGR_A_ID as IGR7_9_, igrpair0_.IGR_B_ID as IGR8_9_, igrpair0_.PAIR_ID as PAIR9_9_'
+-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[igrpair0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
| \-[FROM_FRAGMENT] FromElement: 'IGR_PAIR igrpair0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=IGR_PAIR,tableAlias=igrpair0_,colums={,className=app.model.beans.IGRPair}}
\-[WHERE] SqlNode: 'where'
\-[EQ] SqlNode: '='
+-[SQL_TOKEN] IdentNode: 'igrpair0_.PAIR_ID' {originalText=pairID}
\-[NUM_INT] LiteralNode: '17'

08:57:14,703 DEBUG main org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
08:57:14,703 DEBUG main org.hibernate.hql.ast.QueryTranslatorImpl - HQL: from app.model.beans.IGRPair where pairID = 17
08:57:14,703 DEBUG main org.hibernate.hql.ast.QueryTranslatorImpl - SQL: select igrpair0_.ID as ID, igrpair0_.VERSION as VERSION9_, igrpair0_.NAME as NAME9_, igrpair0_.CONFIG_STATE as CONFIG5_9_, igrpair0_.PROJECT_ID as PROJECT6_9_, igrpair0_.IGR_A_ID as IGR7_9_, igrpair0_.IGR_B_ID as IGR8_9_, igrpair0_.PAIR_ID as PAIR9_9_ from IGR_PAIR igrpair0_ where igrpair0_.PAIR_ID=17
08:57:14,703 DEBUG main org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
08:57:14,703 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
08:57:14,703 DEBUG main org.hibernate.SQL - select igrpair0_.ID as ID, igrpair0_.VERSION as VERSION9_, igrpair0_.NAME as NAME9_, igrpair0_.CONFIG_STATE as CONFIG5_9_, igrpair0_.PROJECT_ID as PROJECT6_9_, igrpair0_.IGR_A_ID as IGR7_9_, igrpair0_.IGR_B_ID as IGR8_9_, igrpair0_.PAIR_ID as PAIR9_9_ from IGR_PAIR igrpair0_ where igrpair0_.PAIR_ID=17
08:57:14,718 DEBUG main org.hibernate.jdbc.AbstractBatcher - preparing statement
08:57:14,734 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
08:57:14,734 DEBUG main org.hibernate.loader.Loader - processing result set
08:57:14,734 DEBUG main org.hibernate.loader.Loader - result set row: 0
08:57:14,734 DEBUG main org.hibernate.loader.Loader - result row: EntityKey[app.model.beans.IGRPair#1265]
08:57:14,750 DEBUG main org.hibernate.loader.Loader - Initializing object from ResultSet: [app.model.beans.IGRPair#1265]
08:57:14,750 DEBUG main org.hibernate.persister.entity.BasicEntityPersister - Hydrating entity: [app.model.beans.IGRPair#1265]
08:57:14,750 DEBUG main org.hibernate.engine.TwoPhaseLoad - Version: 1
08:57:14,750 DEBUG main org.hibernate.loader.Loader - done processing result set (1 rows)
08:57:14,750 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
08:57:14,750 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
08:57:14,750 DEBUG main org.hibernate.jdbc.AbstractBatcher - closing statement
08:57:14,750 DEBUG main org.hibernate.loader.Loader - total objects hydrated: 1
08:57:14,750 DEBUG main org.hibernate.engine.TwoPhaseLoad - resolving associations for [app.model.beans.IGRPair#1265]
08:57:14,750 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - loading entity: [app.model.beans.IGR#1266]
08:57:14,750 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [app.model.beans.IGR#1266]
08:57:14,750 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - object not resolved in any cache: [app.model.beans.IGR#1266]
08:57:14,750 DEBUG main org.hibernate.persister.entity.BasicEntityPersister - Materializing entity: [app.model.beans.IGR#1266]
08:57:14,750 DEBUG main org.hibernate.loader.Loader - loading entity: [app.model.beans.IGR#1266]
08:57:14,750 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
08:57:14,750 DEBUG main org.hibernate.SQL - select igr0_.ID as ID0_, igr0_.VERSION as VERSION2_0_, igr0_.NAME as NAME2_0_, igr0_.CONFIG_STATE as CONFIG5_2_0_, igr0_.PROJECT_ID as PROJECT6_2_0_, igr0_.REGION_ID as REGION7_2_0_, igr0_.REGIONAL_ID as REGIONAL8_2_0_, igr0_.MANUFACTURER as MANUFACT9_2_0_, igr0_.ROLE as ROLE2_0_, igr0_.MGMT_NAME as MGMT11_2_0_, igr0_.MGMT_PASSWORD as MGMT12_2_0_, igr0_.SNMP_NAME as SNMP13_2_0_, igr0_.SNMP_PASSWORD as SNMP14_2_0_, igr0_.TELNET_NAME as TELNET15_2_0_, igr0_.TELNET_PASSWORD as TELNET16_2_0_, igr0_.MGMT_ADDR as MGMT17_2_0_, igr0_.OSPF_ADDR as OSPF18_2_0_, igr0_.OSPF_NMSK as OSPF19_2_0_, igr0_.ALIAS as ALIAS2_0_, igr0_.CONFIG_LEVEL as CONFIG21_2_0_, igr0_.CONFIG_PWD as CONFIG22_2_0_, igr0_.FIRMWARE_VER as FIRMWARE23_2_0_, igr0_.SOURCE_SCRIPT as SOURCE24_2_0_ from NE igr0_ where igr0_.ID=? and igr0_.OBJ_TYPE='IGR'
08:57:14,781 DEBUG main org.hibernate.jdbc.AbstractBatcher - preparing statement
08:57:14,796 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
08:57:14,796 DEBUG main org.hibernate.loader.Loader - processing result set
08:57:14,796 DEBUG main org.hibernate.loader.Loader - result set row: 0
08:57:14,796 DEBUG main org.hibernate.loader.Loader - result row: EntityKey[app.model.beans.IGR#1266]
08:57:14,796 DEBUG main org.hibernate.loader.Loader - Initializing object from ResultSet: [app.model.beans.IGR#1266]
08:57:14,796 DEBUG main org.hibernate.persister.entity.BasicEntityPersister - Hydrating entity: [app.model.beans.IGR#1266]
08:57:14,796 DEBUG main org.hibernate.engine.TwoPhaseLoad - Version: 0
08:57:14,796 DEBUG main org.hibernate.loader.Loader - done processing result set (1 rows)
08:57:14,796 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
08:57:14,796 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
08:57:14,796 DEBUG main org.hibernate.jdbc.AbstractBatcher - closing statement
08:57:14,812 DEBUG main org.hibernate.loader.Loader - total objects hydrated: 1
08:57:14,812 DEBUG main org.hibernate.engine.TwoPhaseLoad - resolving associations for [app.model.beans.IGR#1266]
08:57:14,812 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - loading entity: [app.model.beans.Region#1264]
08:57:14,812 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [app.model.beans.Region#1264]
08:57:14,812 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - object not resolved in any cache: [app.model.beans.Region#1264]
08:57:14,812 DEBUG main org.hibernate.persister.entity.BasicEntityPersister - Materializing entity: [app.model.beans.Region#1264]
08:57:14,812 DEBUG main org.hibernate.loader.Loader - loading entity: [app.model.beans.Region#1264]
08:57:14,812 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
08:57:14,812 DEBUG main org.hibernate.SQL - select region0_.ID as ID0_, region0_.CODE as CODE1_0_, region0_.NAME as NAME1_0_, region0_.NOTES as NOTES1_0_ from REGION region0_ where region0_.ID=?
08:57:14,812 DEBUG main org.hibernate.jdbc.AbstractBatcher - preparing statement
08:57:14,828 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
08:57:14,828 DEBUG main org.hibernate.loader.Loader - processing result set
08:57:14,843 DEBUG main org.hibernate.loader.Loader - result set row: 0
08:57:14,843 DEBUG main org.hibernate.loader.Loader - result row: EntityKey[app.model.beans.Region#1264]
08:57:14,843 DEBUG main org.hibernate.loader.Loader - Initializing object from ResultSet: [app.model.beans.Region#1264]
08:57:14,843 DEBUG main org.hibernate.persister.entity.BasicEntityPersister - Hydrating entity: [app.model.beans.Region#1264]
08:57:14,843 DEBUG main org.hibernate.loader.Loader - done processing result set (1 rows)
08:57:14,843 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
08:57:14,843 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
08:57:14,843 DEBUG main org.hibernate.jdbc.AbstractBatcher - closing statement
08:57:14,843 DEBUG main org.hibernate.loader.Loader - total objects hydrated: 1
08:57:14,843 DEBUG main org.hibernate.engine.TwoPhaseLoad - resolving associations for [app.model.beans.Region#1264]
08:57:14,843 DEBUG main org.hibernate.engine.TwoPhaseLoad - done materializing entity [app.model.beans.Region#1264]
08:57:14,843 DEBUG main org.hibernate.loader.Loader - done entity load
08:57:14,843 DEBUG main org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[app.model.beans.NE.ports#1266]
08:57:14,843 DEBUG main org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[app.model.beans.NE.vnes#1266]
08:57:14,843 DEBUG main org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[app.model.beans.NE.baseAddresses#1266]
08:57:14,843 DEBUG main org.hibernate.engine.TwoPhaseLoad - done materializing entity [app.model.beans.IGR#1266]
08:57:14,843 DEBUG main org.hibernate.loader.Loader - done entity load
08:57:14,843 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - loading entity: [app.model.beans.IGR#1267]
08:57:14,843 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [app.model.beans.IGR#1267]
08:57:14,843 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - object not resolved in any cache: [app.model.beans.IGR#1267]
08:57:14,843 DEBUG main org.hibernate.persister.entity.BasicEntityPersister - Materializing entity: [app.model.beans.IGR#1267]
08:57:14,859 DEBUG main org.hibernate.loader.Loader - loading entity: [app.model.beans.IGR#1267]
08:57:14,859 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
08:57:14,859 DEBUG main org.hibernate.SQL - select igr0_.ID as ID0_, igr0_.VERSION as VERSION2_0_, igr0_.NAME as NAME2_0_, igr0_.CONFIG_STATE as CONFIG5_2_0_, igr0_.PROJECT_ID as PROJECT6_2_0_, igr0_.REGION_ID as REGION7_2_0_, igr0_.REGIONAL_ID as REGIONAL8_2_0_, igr0_.MANUFACTURER as MANUFACT9_2_0_, igr0_.ROLE as ROLE2_0_, igr0_.MGMT_NAME as MGMT11_2_0_, igr0_.MGMT_PASSWORD as MGMT12_2_0_, igr0_.SNMP_NAME as SNMP13_2_0_, igr0_.SNMP_PASSWORD as SNMP14_2_0_, igr0_.TELNET_NAME as TELNET15_2_0_, igr0_.TELNET_PASSWORD as TELNET16_2_0_, igr0_.MGMT_ADDR as MGMT17_2_0_, igr0_.OSPF_ADDR as OSPF18_2_0_, igr0_.OSPF_NMSK as OSPF19_2_0_, igr0_.ALIAS as ALIAS2_0_, igr0_.CONFIG_LEVEL as CONFIG21_2_0_, igr0_.CONFIG_PWD as CONFIG22_2_0_, igr0_.FIRMWARE_VER as FIRMWARE23_2_0_, igr0_.SOURCE_SCRIPT as SOURCE24_2_0_ from NE igr0_ where igr0_.ID=? and igr0_.OBJ_TYPE='IGR'
08:57:14,875 DEBUG main org.hibernate.jdbc.AbstractBatcher - preparing statement
08:57:14,890 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
08:57:14,890 DEBUG main org.hibernate.loader.Loader - processing result set
08:57:14,890 DEBUG main org.hibernate.loader.Loader - result set row: 0
08:57:14,890 DEBUG main org.hibernate.loader.Loader - result row: EntityKey[app.model.beans.IGR#1267]
08:57:14,890 DEBUG main org.hibernate.loader.Loader - Initializing object from ResultSet: [app.model.beans.IGR#1267]
08:57:14,890 DEBUG main org.hibernate.persister.entity.BasicEntityPersister - Hydrating entity: [app.model.beans.IGR#1267]
08:57:14,890 DEBUG main org.hibernate.engine.TwoPhaseLoad - Version: 0
08:57:14,890 DEBUG main org.hibernate.loader.Loader - done processing result set (1 rows)
08:57:14,890 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
08:57:14,890 DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
08:57:14,890 DEBUG main org.hibernate.jdbc.AbstractBatcher - closing statement
08:57:14,890 DEBUG main org.hibernate.loader.Loader - total objects hydrated: 1
08:57:14,890 DEBUG main org.hibernate.engine.TwoPhaseLoad - resolving associations for [app.model.beans.IGR#1267]
08:57:14,906 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - loading entity: [app.model.beans.Region#1264]
08:57:14,906 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [app.model.beans.Region#1264]
08:57:14,906 DEBUG main org.hibernate.event.def.DefaultLoadEventListener - resolved object in session cache: [app.model.beans.Region#1264]
08:57:14,906 DEBUG main org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[app.model.beans.NE.ports#1267]
08:57:14,906 DEBUG main org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[app.model.beans.NE.vnes#1267]
08:57:14,906 DEBUG main org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[app.model.beans.NE.baseAddresses#1267]
08:57:14,906 DEBUG main org.hibernate.engine.TwoPhaseLoad - done materializing entity [app.model.beans.IGR#1267]
08:57:14,906 DEBUG main org.hibernate.loader.Loader - done entity load
08:57:14,906 DEBUG main org.hibernate.engine.TwoPhaseLoad - done materializing entity [app.model.beans.IGRPair#1265]
08:57:14,906 DEBUG main org.hibernate.engine.PersistenceContext - initializing non-lazy collections

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 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.