Hi, 
I got a problem with a SQL query generated from HSQL and the entity which are created as results.
As a summary, I'm using a HQL query using 'left join fetch' on one-to-many relationship.
on my test data, a company is linked to three financialstatement.
when I run the query, I got [bold]three[/bold] company instances as results.
Maybe I have misunderstood how works hibernate but I would expect only one result of type company with a financialstatement list containing three financialstatement.
Below all details I can provide, any feedback would be really welcome.
Thanks in advance,
Christophe
[org.hibernate.ejb.Version] Hibernate EntityManager 3.2.0.CR1
[org.hibernate.cfg.annotations.Version] Hibernate Annotations 3.2.0.CR1
[org.hibernate.cfg.Environment] Hibernate 3.2 cr2
[org.hibernate.cfg.Environment] hibernate.properties not found
[org.hibernate.cfg.Environment] Bytecode provider name : javassist
I have a company class with one to many relations on a class financialstatement :
Code:
@Entity
@Table(name = "company", catalog = "accountingaudit", uniqueConstraints = {})
public class Company implements java.io.Serializable {
private CompanyId id;
private Set<Financialstatement> financialstatements = new HashSet<Financialstatement>(0);
@EmbeddedId
   @AttributeOverrides( {
         @AttributeOverride(name = "year", column = @Column(name = "Year", unique = false, nullable = false, insertable = true, updatable = true)),
         @AttributeOverride(name = "companyId", column = @Column(name = "CompanyId", unique = false, nullable = false, insertable = true, updatable = true)) })
   public CompanyId getId() {
      return this.id;
   }
   @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "company")
   public Set<Financialstatement> getFinancialstatements() {
      return this.financialstatements;
   }
Code:
@Entity
@Table(name = "financialstatement", catalog = "accountingaudit", uniqueConstraints = {})
public class Financialstatement implements java.io.Serializable {
private FinancialstatementId id;
private Company company;
@EmbeddedId
   @AttributeOverrides( {
         @AttributeOverride(name = "year", column = @Column(name = "Year", unique = false, nullable = false, insertable = true, updatable = true)),
         @AttributeOverride(name = "companyId", column = @Column(name = "CompanyId", unique = false, nullable = false, insertable = true, updatable = true)),
         @AttributeOverride(name = "financialStatementId", column = @Column(name = "FinancialStatementId", unique = false, nullable = false, insertable = true, updatable = true)) })
   public FinancialstatementId getId() {
      return this.id;
   }
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
   @JoinColumns( {
         @JoinColumn(name = "Year", referencedColumnName = "Year", unique = false, nullable = false, insertable = false, updatable = false),
         @JoinColumn(name = "CompanyId", referencedColumnName = "CompanyId", unique = false, nullable = false, insertable = false, updatable = false) })
   public Company getCompany() {
      return this.company;
   }
HQL query : 
Code:
select company  from accountingAudit.businessObjects.Company as company  left join fetch company.financialstatements  as financialstatement  where  company.id.year = :year  and  company.companyName like :companyName
generated SQL query :
Code:
select company0_.Year as Year6_0_, company0_.CompanyId as CompanyId6_0_, financials1_.Year as Year9_1_, financials1_.CompanyId as CompanyId9_1_, financials1_.FinancialStatementId as Financia3_9_1_, company0_.Address as Address6_0_, company0_.Remarks as Remarks6_0_, company0_.CompanyName as CompanyN5_6_0_, company0_.AlternativeCaseManagerId as Alternat9_6_0_, company0_.LineOfBusinessId as LineOfB10_6_0_, company0_.CaseManagerId as CaseMan11_6_0_, company0_.CompanyRegistrationNumber as CompanyR6_6_0_, company0_.DateForListing as DateForL7_6_0_, company0_.DateForDelisting as DateForD8_6_0_, financials1_.ExpectedPublicationDate as Expected4_9_1_, financials1_.FinancialStatementTypeId as Financia5_9_1_, financials1_.FinancialYearPeriodId as Financia6_9_1_, financials1_.InterimPeriodId as InterimP7_9_1_, financials1_.AccountingPrincipleId as Accounti8_9_1_, financials1_.PublicationStatusId as Publicat9_9_1_, financials1_.ScreeningTypeId as Screeni10_9_1_, financials1_.Year as Year0__, financials1_.CompanyId as CompanyId0__, financials1_.FinancialStatementId as Financia3_0__ from accountingaudit.company company0_ left outer join accountingaudit.financialstatement financials1_ on company0_.Year=financials1_.Year and company0_.CompanyId=financials1_.CompanyId where company0_.Year=? and (company0_.CompanyName like ?)
I can see that 
some columns are repeated twice, it may be the cause of the problem
financials1_.Year as Year9_1_, financials1_.CompanyId as CompanyId9_1_, financials1_.FinancialStatementId as Financia3_9_1_
and
financials1_.Year as Year0__, financials1_.CompanyId as CompanyId0__, financials1_.FinancialStatementId as Financia3_0__ from accountingaudit.company company0_
more details :
Server log on Entitymanager.createQuery
Code:
2006-09-30 18:49:48,171 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4749835420348416
2006-09-30 18:49:48,171 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
2006-09-30 18:49:48,171 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2006-09-30 18:49:48,171 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
2006-09-30 18:49:48,171 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2006-09-30 18:49:48,171 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
2006-09-30 18:49:48,171 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL:  select company  from accountingAudit.businessObjects.Company as company  left join fetch company.financialstatements  as financialstatement  where  company.id.year = :year  and  company.companyName like :companyName 
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.AST] --- HQL AST ---
 \-[QUERY] 'query'
    +-[SELECT_FROM] 'SELECT_FROM'
    |  +-[FROM] 'from'
    |  |  +-[RANGE] 'RANGE'
    |  |  |  +-[DOT] '.'
    |  |  |  |  +-[DOT] '.'
    |  |  |  |  |  +-[IDENT] 'accountingAudit'
    |  |  |  |  |  \-[IDENT] 'businessObjects'
    |  |  |  |  \-[IDENT] 'Company'
    |  |  |  \-[ALIAS] 'company'
    |  |  \-[JOIN] 'join'
    |  |     +-[LEFT] 'left'
    |  |     +-[FETCH] 'fetch'
    |  |     +-[DOT] '.'
    |  |     |  +-[IDENT] 'company'
    |  |     |  \-[IDENT] 'financialstatements'
    |  |     \-[ALIAS] 'financialstatement'
    |  \-[SELECT] 'select'
    |     \-[IDENT] 'company'
    \-[WHERE] 'where'
       \-[AND] 'and'
          +-[EQ] '='
          |  +-[DOT] '.'
          |  |  +-[DOT] '.'
          |  |  |  +-[IDENT] 'company'
          |  |  |  \-[IDENT] 'id'
          |  |  \-[IDENT] 'year'
          |  \-[COLON] ':'
          |     \-[IDENT] 'year'
          \-[LIKE] 'like'
             +-[DOT] '.'
             |  +-[IDENT] 'company'
             |  \-[IDENT] 'companyName'
             \-[COLON] ':'
                \-[IDENT] 'companyName'
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select << begin [level=1, statement=select]
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} :  accountingAudit.businessObjects.Company (company) -> company0_
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company -> (company0_.Year, company0_.CompanyId)
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.DotNode] getDataType() : financialstatements -> org.hibernate.type.SetType(accountingAudit.businessObjects.Company.financialstatements)
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.FromElementFactory] createEntityAssociation() : One to many - path = company.financialstatements role = accountingAudit.businessObjects.Company.financialstatements associatedEntityName = accountingAudit.businessObjects.Financialstatement
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} :  accountingAudit.businessObjects.Financialstatement (financialstatement) -> financials1_
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.FromClause] addJoinByPathMap() : company.financialstatements -> accountingaudit.financialstatement financials1_
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.DotNode] dereferenceCollection() : Created new FROM element for company.financialstatements : accountingaudit.financialstatement financials1_
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company.financialstatements -> .
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] createFromJoinElement() : -- join tree --
 \-[JOIN_FRAGMENT] FromElement: 'accountingaudit.financialstatement financials1_' FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=financialstatement,role=accountingAudit.businessObjects.Company.financialstatements,tableName=accountingaudit.financialstatement,tableAlias=financials1_,origin=accountingaudit.company company0_,colums={company0_.Year company0_.CompanyId ,className=accountingAudit.businessObjects.Financialstatement}}
2006-09-30 18:49:48,187 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company -> (company0_.Year, company0_.CompanyId)
2006-09-30 18:49:48,203 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company -> (company0_.Year, company0_.CompanyId)
2006-09-30 18:49:48,203 DEBUG [org.hibernate.hql.ast.tree.DotNode] getDataType() : id -> org.hibernate.type.ComponentType@1f17060
2006-09-30 18:49:48,203 DEBUG [org.hibernate.hql.ast.tree.DotNode] Unresolved property path is now 'id.year'
2006-09-30 18:49:48,203 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company.id -> company0_.Year
2006-09-30 18:49:48,203 DEBUG [org.hibernate.hql.ast.tree.DotNode] getDataType() : id.year -> org.hibernate.type.IntegerType@8bae7
2006-09-30 18:49:48,203 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company.id.year -> company0_.Year
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company -> (company0_.Year, company0_.CompanyId)
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.tree.DotNode] getDataType() : companyName -> org.hibernate.type.StringType@1cfa3d2
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  company.companyName -> company0_.CompanyName
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select : finishing up [level=1, statement=select]
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() :  ( SELECT ( {select clause} (company0_.Year, company0_.CompanyId) ) ( FromClause{level=1} ( accountingaudit.company company0_ accountingaudit.financialstatement financials1_ ) ) ( where ( and ( = ( company0_.Year ( company0_.Year (company0_.Year, company0_.CompanyId) id ) year ) ? ) ( like ( company0_.CompanyName (company0_.Year, company0_.CompanyId) companyName ) ? ) ) ) )
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment [left outer join accountingaudit.financialstatement financials1_ on company0_.Year=financials1_.Year and company0_.CompanyId=financials1_.CompanyId]
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment [accountingaudit.company company0_]
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select >> end [level=1, statement=select]
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.AST] --- SQL AST ---
 \-[SELECT] QueryNode: 'SELECT'  querySpaces (accountingaudit.company,accountingaudit.financialstatement)
    +-[SELECT_CLAUSE] SelectClause: '{select clause}'
    |  +-[ALIAS_REF] IdentNode: 'company0_.Year as Year6_0_, company0_.CompanyId as CompanyId6_0_' {alias=company, className=accountingAudit.businessObjects.Company, tableAlias=company0_}
    |  +-[SELECT_EXPR] SelectExpressionImpl: 'financials1_.Year as Year9_1_, financials1_.CompanyId as CompanyId9_1_, financials1_.FinancialStatementId as Financia3_9_1_' {FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=financialstatement,role=accountingAudit.businessObjects.Company.financialstatements,tableName=accountingaudit.financialstatement,tableAlias=financials1_,origin=accountingaudit.company company0_,colums={company0_.Year company0_.CompanyId ,className=accountingAudit.businessObjects.Financialstatement}}}
    |  +-[SQL_TOKEN] SqlFragment: 'company0_.Address as Address6_0_, company0_.Remarks as Remarks6_0_, company0_.CompanyName as CompanyN5_6_0_, company0_.AlternativeCaseManagerId as Alternat9_6_0_, company0_.LineOfBusinessId as LineOfB10_6_0_, company0_.CaseManagerId as CaseMan11_6_0_, company0_.CompanyRegistrationNumber as CompanyR6_6_0_, company0_.DateForListing as DateForL7_6_0_, company0_.DateForDelisting as DateForD8_6_0_'
    |  +-[SQL_TOKEN] SqlFragment: 'financials1_.ExpectedPublicationDate as Expected4_9_1_, financials1_.FinancialStatementTypeId as Financia5_9_1_, financials1_.FinancialYearPeriodId as Financia6_9_1_, financials1_.InterimPeriodId as InterimP7_9_1_, financials1_.AccountingPrincipleId as Accounti8_9_1_, financials1_.PublicationStatusId as Publicat9_9_1_, financials1_.ScreeningTypeId as Screeni10_9_1_'
    |  \-[SQL_TOKEN] SqlFragment: 'financials1_.Year as Year0__, financials1_.CompanyId as CompanyId0__, financials1_.FinancialStatementId as Financia3_0__'
    +-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=2, fromElements=2, fromElementByClassAlias=[financialstatement, company], fromElementByTableAlias=[company0_, financials1_], fromElementsByPath=[company.financialstatements], collectionJoinFromElementsByPath=[], impliedElements=[]}
    |  \-[FROM_FRAGMENT] FromElement: 'accountingaudit.company company0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=company,role=null,tableName=accountingaudit.company,tableAlias=company0_,origin=null,colums={,className=accountingAudit.businessObjects.Company}}
    |     \-[JOIN_FRAGMENT] FromElement: 'left outer join accountingaudit.financialstatement financials1_ on company0_.Year=financials1_.Year and company0_.CompanyId=financials1_.CompanyId' FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=financialstatement,role=accountingAudit.businessObjects.Company.financialstatements,tableName=accountingaudit.financialstatement,tableAlias=financials1_,origin=accountingaudit.company company0_,colums={company0_.Year company0_.CompanyId ,className=accountingAudit.businessObjects.Financialstatement}}
    \-[WHERE] SqlNode: 'where'
       \-[AND] SqlNode: 'and'
          +-[EQ] BinaryLogicOperatorNode: '='
          |  +-[DOT] DotNode: 'company0_.Year' {propertyName=year,dereferenceType=4,propertyPath=id.year,path=company.id.year,tableAlias=company0_,className=accountingAudit.businessObjects.Company,classAlias=company}
          |  |  +-[DOT] DotNode: 'company0_.Year' {propertyName=year,dereferenceType=2,propertyPath=id.year,path=company.id,tableAlias=company0_,className=accountingAudit.businessObjects.Company,classAlias=company}
          |  |  |  +-[ALIAS_REF] IdentNode: '(company0_.Year, company0_.CompanyId)' {alias=company, className=accountingAudit.businessObjects.Company, tableAlias=company0_}
          |  |  |  \-[IDENT] IdentNode: 'id' {originalText=id}
          |  |  \-[IDENT] IdentNode: 'year' {originalText=year}
          |  \-[NAMED_PARAM] ParameterNode: '?' {name=year, expectedType=org.hibernate.type.IntegerType@8bae7}
          \-[LIKE] BinaryLogicOperatorNode: 'like'
             +-[DOT] DotNode: 'company0_.CompanyName' {propertyName=companyName,dereferenceType=4,propertyPath=companyName,path=company.companyName,tableAlias=company0_,className=accountingAudit.businessObjects.Company,classAlias=company}
             |  +-[ALIAS_REF] IdentNode: '(company0_.Year, company0_.CompanyId)' {alias=company, className=accountingAudit.businessObjects.Company, tableAlias=company0_}
             |  \-[IDENT] IdentNode: 'companyName' {originalText=companyName}
             \-[NAMED_PARAM] ParameterNode: '?' {name=companyName, expectedType=org.hibernate.type.StringType@1cfa3d2}
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL:  select company  from accountingAudit.businessObjects.Company as company  left join fetch company.financialstatements  as financialstatement  where  company.id.year = :year  and  company.companyName like :companyName 
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select company0_.Year as Year6_0_, company0_.CompanyId as CompanyId6_0_, financials1_.Year as Year9_1_, financials1_.CompanyId as CompanyId9_1_, financials1_.FinancialStatementId as Financia3_9_1_, company0_.Address as Address6_0_, company0_.Remarks as Remarks6_0_, company0_.CompanyName as CompanyN5_6_0_, company0_.AlternativeCaseManagerId as Alternat9_6_0_, company0_.LineOfBusinessId as LineOfB10_6_0_, company0_.CaseManagerId as CaseMan11_6_0_, company0_.CompanyRegistrationNumber as CompanyR6_6_0_, company0_.DateForListing as DateForL7_6_0_, company0_.DateForDelisting as DateForD8_6_0_, financials1_.ExpectedPublicationDate as Expected4_9_1_, financials1_.FinancialStatementTypeId as Financia5_9_1_, financials1_.FinancialYearPeriodId as Financia6_9_1_, financials1_.InterimPeriodId as InterimP7_9_1_, financials1_.AccountingPrincipleId as Accounti8_9_1_, financials1_.PublicationStatusId as Publicat9_9_1_, financials1_.ScreeningTypeId as Screeni10_9_1_, financials1_.Year as Year0__, financials1_.CompanyId as CompanyId0__, financials1_.FinancialStatementId as Financia3_0__ from accountingaudit.company company0_ left outer join accountingaudit.financialstatement financials1_ on company0_.Year=financials1_.Year and company0_.CompanyId=financials1_.CompanyId where company0_.Year=? and (company0_.CompanyName like ?)
2006-09-30 18:49:48,218 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
server.log on query.getResultsList()
Code:
2006-09-30 18:49:48,234 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-09-30 18:49:48,234 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2006-09-30 18:49:48,234 DEBUG [org.hibernate.SQL] select company0_.Year as Year6_0_, company0_.CompanyId as CompanyId6_0_, financials1_.Year as Year9_1_, financials1_.CompanyId as CompanyId9_1_, financials1_.FinancialStatementId as Financia3_9_1_, company0_.Address as Address6_0_, company0_.Remarks as Remarks6_0_, company0_.CompanyName as CompanyN5_6_0_, company0_.AlternativeCaseManagerId as Alternat9_6_0_, company0_.LineOfBusinessId as LineOfB10_6_0_, company0_.CaseManagerId as CaseMan11_6_0_, company0_.CompanyRegistrationNumber as CompanyR6_6_0_, company0_.DateForListing as DateForL7_6_0_, company0_.DateForDelisting as DateForD8_6_0_, financials1_.ExpectedPublicationDate as Expected4_9_1_, financials1_.FinancialStatementTypeId as Financia5_9_1_, financials1_.FinancialYearPeriodId as Financia6_9_1_, financials1_.InterimPeriodId as InterimP7_9_1_, financials1_.AccountingPrincipleId as Accounti8_9_1_, financials1_.PublicationStatusId as Publicat9_9_1_, financials1_.ScreeningTypeId as Screeni10_9_1_, financials1_.Year as Year0__, financials1_.CompanyId as CompanyId0__, financials1_.FinancialStatementId as Financia3_0__ from accountingaudit.company company0_ left outer join accountingaudit.financialstatement financials1_ on company0_.Year=financials1_.Year and company0_.CompanyId=financials1_.CompanyId where company0_.Year=? and (company0_.CompanyName like ?)
2006-09-30 18:49:48,234 INFO  [STDOUT] Hibernate: select company0_.Year as Year6_0_, company0_.CompanyId as CompanyId6_0_, financials1_.Year as Year9_1_, financials1_.CompanyId as CompanyId9_1_, financials1_.FinancialStatementId as Financia3_9_1_, company0_.Address as Address6_0_, company0_.Remarks as Remarks6_0_, company0_.CompanyName as CompanyN5_6_0_, company0_.AlternativeCaseManagerId as Alternat9_6_0_, company0_.LineOfBusinessId as LineOfB10_6_0_, company0_.CaseManagerId as CaseMan11_6_0_, company0_.CompanyRegistrationNumber as CompanyR6_6_0_, company0_.DateForListing as DateForL7_6_0_, company0_.DateForDelisting as DateForD8_6_0_, financials1_.ExpectedPublicationDate as Expected4_9_1_, financials1_.FinancialStatementTypeId as Financia5_9_1_, financials1_.FinancialYearPeriodId as Financia6_9_1_, financials1_.InterimPeriodId as InterimP7_9_1_, financials1_.AccountingPrincipleId as Accounti8_9_1_, financials1_.PublicationStatusId as Publicat9_9_1_, financials1_.ScreeningTypeId as Screeni10_9_1_, financials1_.Year as Year0__, financials1_.CompanyId as CompanyId0__, financials1_.FinancialStatementId as Financia3_0__ from accountingaudit.company company0_ left outer join accountingaudit.financialstatement financials1_ on company0_.Year=financials1_.Year and company0_.CompanyId=financials1_.CompanyId where company0_.Year=? and (company0_.CompanyName like ?)
2006-09-30 18:49:48,234 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() 2006 -> year [1]
2006-09-30 18:49:48,234 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() %Carl% -> companyName [2]
2006-09-30 18:49:48,250 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2006-09-30 18:49:48,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[accountingAudit.businessObjects.Company#component[year,companyId]{companyId=1, year=2006}], EntityKey[accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=2}]
2006-09-30 18:49:48,265 DEBUG [org.hibernate.loader.Loader] found row of collection: [accountingAudit.businessObjects.Company.financialstatements#component[year,companyId]{companyId=1, year=2006}]
2006-09-30 18:49:48,265 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[accountingAudit.businessObjects.Company#component[year,companyId]{companyId=1, year=2006}], EntityKey[accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=3}]
2006-09-30 18:49:48,265 DEBUG [org.hibernate.loader.Loader] found row of collection: [accountingAudit.businessObjects.Company.financialstatements#component[year,companyId]{companyId=1, year=2006}]
2006-09-30 18:49:48,281 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[accountingAudit.businessObjects.Company#component[year,companyId]{companyId=1, year=2006}], EntityKey[accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=4}]
2006-09-30 18:49:48,281 DEBUG [org.hibernate.loader.Loader] found row of collection: [accountingAudit.businessObjects.Company.financialstatements#component[year,companyId]{companyId=1, year=2006}]
2006-09-30 18:49:48,281 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2006-09-30 18:49:48,281 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-09-30 18:49:48,281 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2006-09-30 18:49:48,281 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2006-09-30 18:49:48,281 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [accountingAudit.businessObjects.Company#component[year,companyId]{companyId=1, year=2006}]
2006-09-30 18:49:48,281 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@10e2558, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@177daaa{ url=null ,addedOrder=0}
2006-09-30 18:49:48,281 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@10e2558, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@15bab52{ url=null ,addedOrder=0}
2006-09-30 18:49:48,281 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@10e2558, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@14cbf3f{ url=null ,addedOrder=0}
2006-09-30 18:49:48,281 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [accountingAudit.businessObjects.Company#component[year,companyId]{companyId=1, year=2006}]
2006-09-30 18:49:48,281 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=2}]
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=2}]
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=3}]
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=3}]
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=4}]
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [accountingAudit.businessObjects.Financialstatement#component[year,companyId,financialStatementId]{companyId=1, year=2006, financialStatementId=4}]
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.CollectionLoadContext] 1 collections were found in result set for role: accountingAudit.businessObjects.Company.financialstatements
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.CollectionLoadContext] collection fully initialized: [accountingAudit.businessObjects.Company.financialstatements#component[year,companyId]{companyId=1, year=2006}]
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.CollectionLoadContext] 1 collections initialized for role: accountingAudit.businessObjects.Company.financialstatements
2006-09-30 18:49:48,296 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections