-->
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.  [ 1 post ] 
Author Message
 Post subject: HQL for many-to-many relationship
PostPosted: Thu Feb 10, 2005 4:00 pm 
Newbie

Joined: Thu Feb 10, 2005 1:00 pm
Posts: 1
Any one ever created a method in a DAO that fetches rows based upon a many-to-many relationship?

here is what i am doing:

1. Add subscription. (Works fine.)
2. Then i fetch subscriptions based upon notificationType.

Hibernate version:
2.1

Mapping documents:

Subscription.hbm.xml:
Code:
<hibernate-mapping
   package="jfcom.cie.dao">

   <class name="jfcom.cie.dao.Subscription" table="SUBSCRIPTION">
      <id name="id" column="SUBSCRIPTION_ID" type="java.lang.Long">
         <generator class="native"/>
      </id>

        <property name="userId" type="java.lang.String">
         <column name="USER_ID" not-null="true"/>
      </property>

        <property name="name" type="java.lang.String">
         <column name="NAME" not-null="true"/>
      </property>

        <many-to-one name="subscriptionType" column="SUBSCRIPTION_TYPE" class="jfcom.cie.dao.SubscriptionType" cascade="all" access="property" not-null="true"/>

      <set name="notificationTypes" table="SUBSCRIPTION_NOTIFICATION" lazy="false">
         <key>
            <column name="SUBSCRIPTION_ID" not-null="true"/>
         </key>
            
         <many-to-many class="jfcom.cie.dao.NotificationType">
            <column name="NOTIFICATION_TYPE_ID" not-null="true"/>
         </many-to-many>
         
      </set>
      
   </class>
      
</hibernate-mapping>


NotificationType.hbm.xml:
Code:
<hibernate-mapping
   package="jfcom.cie.dao">

   <class name="jfcom.cie.dao.NotificationType" table="NOTIFICATION_TYPE">
      <id name="id" column="NOTIFICATION_TYPE_ID" type="java.lang.Long">
         <generator class="native"/>
      </id>

        <property name="name" type="java.lang.String">
         <column name="NAME" not-null="true" unique="true"/>
      </property>

        <property name="description" type="java.lang.String">
         <column name="DESCRIPTION"/>
      </property>

      <property name="isViewable" type="boolean">
         <column name="IS_VIEWABLE" not-null="true"/>
      </property>
   </class>
      
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():
Code:
   public List getSubscriptionListByNotificationType( String value ) {
      StringBuffer buf = new StringBuffer();
      
      buf.append( "FROM Subscription AS sub" );
           buf.append( " JOIN Subscription_Notification AS sn on sub.subscription_id = sn.subscription_id" );
      buf.append( " JOIN Notification_Type on sn.notification_type_id = nt.notification_type_id" );
      buf.append( " WHERE nt.name = '" + value + "'" );
      
      return getHibernateTemplate().find( buf.toString() );
   }

Full stack trace of any exception that occurs:
Code:
org.springframework.orm.hibernate.HibernateQueryException: unexpected token: as [FROM jfcom.cie.dao.Subscription AS sub JOIN Subscription_Notification AS sn on sub.subscription_id = sn.subscription_id JOIN notification_type AS nt on sn.notification_type_id = nt.notification_type_id WHERE nt.name = 'Jabber']; nested exception is net.sf.hibernate.QueryException: unexpected token: as [FROM jfcom.cie.dao.Subscription AS sub JOIN Subscription_Notification AS sn on sub.subscription_id = sn.subscription_id JOIN notification_type AS nt on sn.notification_type_id = nt.notification_type_id WHERE nt.name = 'Jabber']
net.sf.hibernate.QueryException: unexpected token: as [FROM jfcom.cie.dao.Subscription AS sub JOIN Subscription_Notification AS sn on sub.subscription_id = sn.subscription_id JOIN notification_type AS nt on sn.notification_type_id = nt.notification_type_id WHERE nt.name = 'Jabber']
        at net.sf.hibernate.hql.FromParser.token(FromParser.java:94)
        at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
        at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
        at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
        at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
        at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
        at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:294)
        at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1562)
        at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1533)
        at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
        at org.springframework.orm.hibernate.HibernateTemplate$23.doInHibernate(HibernateTemplate.java:486)
        at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:228)
        at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:248)
        at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:483)
        at jfcom.cie.dao.SubscriptionDAO.getSubscriptionListByNotificationType(SubscriptionDAO.java:32)
        at jfcom.cie.servlet.IoCServlet.doGet(IoCServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:44)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:169)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)

Name and version of the database you are using:
HSQLDB 1.7.3

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
Debug log down to the above log:
Code:
2005-02-10 14:40:41,472 DEBUG [net.sf.hibernate.impl.SessionImpl] opened session
2005-02-10 14:40:41,472 DEBUG [net.sf.hibernate.impl.SessionImpl] find: from NotificationType where name = 'Jabber'
2005-02-10 14:40:41,472 DEBUG [net.sf.hibernate.engine.QueryParameters] named parameters: {}
2005-02-10 14:40:41,472 DEBUG [net.sf.hibernate.hql.QueryTranslator] compiling query
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.SessionImpl] flushing session
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushing entities and processing referenced collections
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.SessionImpl] Processing unreferenced collections
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.SessionImpl] Scheduling collection removes/(re)creates/updates
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.SessionImpl] Dont need to execute flush
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.hql.QueryTranslator] HQL: from jfcom.cie.dao.NotificationType where name = 'Jabber'
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.hql.QueryTranslator] SQL: select notificati0_.NOTIFICATION_TYPE_ID as NOTIFICA1_, notificati0_.NAME as NAME, notificati0_.DESCRIPTION as DESCRIPT3_, notificati0_.IS_VIEWABLE as I
2005-02-10 14:40:41,488 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,488 DEBUG [org.springframework.jdbc.datasource.DriverManagerDataSource] Creating new JDBC connection to [jdbc:hsqldb:hsql://localhost/mydatabase]
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.SQL] select notificati0_.NOTIFICATION_TYPE_ID as NOTIFICA1_, notificati0_.NAME as NAME, notificati0_.DESCRIPTION as DESCRIPT3_, notificati0_.IS_VIEWABLE as IS_VIEWA4_ from NOTIFI
2005-02-10 14:40:41,504 INFO  [STDOUT] Hibernate: select notificati0_.NOTIFICATION_TYPE_ID as NOTIFICA1_, notificati0_.NAME as NAME, notificati0_.DESCRIPTION as DESCRIPT3_, notificati0_.IS_VIEWABLE as IS_VIEWA4_ from NOTIFICAT
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.loader.Loader] processing result set
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.type.LongType] returning '1' as column: NOTIFICA1_
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.loader.Loader] result row: 1
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: 1
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: jfcom.cie.dao.NotificationType#1
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.type.StringType] returning 'Jabber' as column: NAME
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.type.StringType] returning 'Jabber notification subscription' as column: DESCRIPT3_
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.type.BooleanType] returning 'true' as column: IS_VIEWA4_
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.loader.Loader] done processing result set (1 rows)
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.loader.Loader] total objects hydrated: 1
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [jfcom.cie.dao.NotificationType#1]
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [jfcom.cie.dao.NotificationType#1]
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] initializing non-lazy collections
2005-02-10 14:40:41,504 DEBUG [org.springframework.orm.hibernate.HibernateTemplate] Eagerly flushing Hibernate session
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] flushing session
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushing entities and processing referenced collections
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] Processing unreferenced collections
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] Scheduling collection removes/(re)creates/updates
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.Printer] listing entities:
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.Printer] jfcom.cie.dao.NotificationType{description=Jabber notification subscription, name=Jabber, id=1, isViewable=true}
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] executing flush
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] post flush
2005-02-10 14:40:41,504 DEBUG [org.springframework.orm.hibernate.SessionFactoryUtils] Closing Hibernate session
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] closing session
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] disconnecting session
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] transaction completion
2005-02-10 14:40:41,504 DEBUG [org.springframework.orm.hibernate.SessionFactoryUtils] Opening Hibernate session
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] opened session
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] saveOrUpdate() unsaved instance
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] saving [jfcom.cie.dao.Subscription#<null>]
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] executing insertions
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.engine.Cascades] processing cascades for: jfcom.cie.dao.Subscription
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.engine.Cascades] cascading to saveOrUpdate()
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] saveOrUpdate() unsaved instance
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] saving [jfcom.cie.dao.SubscriptionType#<null>]
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.SessionImpl] executing insertions
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.persister.EntityPersister] Inserting entity: jfcom.cie.dao.SubscriptionType (native id)
2005-02-10 14:40:41,504 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,504 DEBUG [org.springframework.jdbc.datasource.DriverManagerDataSource] Creating new JDBC connection to [jdbc:hsqldb:hsql://localhost/mydatabase]
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.SQL] insert into SUBSCRIPTION_TYPE (NAME, DESCRIPTION, SUBSCRIPTION_TYPE_ID) values (?, ?, null)
2005-02-10 14:40:41,519 INFO  [STDOUT] Hibernate: insert into SUBSCRIPTION_TYPE (NAME, DESCRIPTION, SUBSCRIPTION_TYPE_ID) values (?, ?, null)
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.persister.EntityPersister] Dehydrating entity: [jfcom.cie.dao.SubscriptionType#<null>]
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.type.StringType] binding 'Bubba' to parameter: 1
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.type.StringType] binding 'Bubba scription' to parameter: 2
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.SQL] call identity()
2005-02-10 14:40:41,519 INFO  [STDOUT] Hibernate: call identity()
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.persister.AbstractEntityPersister] Natively generated identity: 55
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2005-02-10 14:40:41,519 DEBUG [net.sf.hibernate.engine.Cascades] done processing cascades for: jfcom.cie.dao.Subscription
2005-02-10 14:40:41,535 DEBUG [net.sf.hibernate.impl.WrapVisitor] Wrapped collection in role: jfcom.cie.dao.Subscription.notificationTypes
2005-02-10 14:40:41,535 DEBUG [net.sf.hibernate.persister.EntityPersister] Inserting entity: jfcom.cie.dao.Subscription (native id)
2005-02-10 14:40:41,535 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,535 DEBUG [net.sf.hibernate.SQL] insert into SUBSCRIPTION (USER_ID, NAME, SUBSCRIPTION_TYPE, SUBSCRIPTION_ID) values (?, ?, ?, null)
2005-02-10 14:40:41,535 INFO  [STDOUT] Hibernate: insert into SUBSCRIPTION (USER_ID, NAME, SUBSCRIPTION_TYPE, SUBSCRIPTION_ID) values (?, ?, ?, null)
2005-02-10 14:40:41,535 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2005-02-10 14:40:41,535 DEBUG [net.sf.hibernate.persister.EntityPersister] Dehydrating entity: [jfcom.cie.dao.Subscription#<null>]
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.type.StringType] binding 'bubba_smith' to parameter: 1
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.type.StringType] binding 'bubba-app' to parameter: 2
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.type.LongType] binding '55' to parameter: 3
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.SQL] call identity()
2005-02-10 14:40:41,550 INFO  [STDOUT] Hibernate: call identity()
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.persister.AbstractEntityPersister] Natively generated identity: 55
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.engine.Cascades] processing cascades for: jfcom.cie.dao.Subscription
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.engine.Cascades] done processing cascades for: jfcom.cie.dao.Subscription
2005-02-10 14:40:41,550 DEBUG [org.springframework.orm.hibernate.HibernateTemplate] Eagerly flushing Hibernate session
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] flushing session
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.engine.Cascades] processing cascades for: jfcom.cie.dao.Subscription
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.engine.Cascades] cascading to saveOrUpdate()
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] saveOrUpdate() persistent instance
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.engine.Cascades] done processing cascades for: jfcom.cie.dao.Subscription
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushing entities and processing referenced collections
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] Collection found: [jfcom.cie.dao.Subscription.notificationTypes#55], was: [<unreferenced>]
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] Processing unreferenced collections
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] Scheduling collection removes/(re)creates/updates
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 0 insertions, 0 updates, 0 deletions to 2 objects
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 1 (re)creations, 0 updates, 0 removals to 1 collections
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.Printer] listing entities:
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.Printer] jfcom.cie.dao.SubscriptionType{description=Bubba scription, name=Bubba, id=55}
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.Printer] jfcom.cie.dao.Subscription{subscriptionType=SubscriptionType#55, userId=bubba_smith, notificationTypes=[NotificationType#1], name=bubba-app, id=55}
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] executing flush
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.collection.BasicCollectionPersister] Inserting collection: [jfcom.cie.dao.Subscription.notificationTypes#55]
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.SQL] insert into SUBSCRIPTION_NOTIFICATION (SUBSCRIPTION_ID, NOTIFICATION_TYPE_ID) values (?, ?)
2005-02-10 14:40:41,550 INFO  [STDOUT] Hibernate: insert into SUBSCRIPTION_NOTIFICATION (SUBSCRIPTION_ID, NOTIFICATION_TYPE_ID) values (?, ?)
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.type.LongType] binding '55' to parameter: 1
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.engine.Cascades] id unsaved-value strategy NULL
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.type.LongType] binding '1' to parameter: 2
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] Adding to batch
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.collection.BasicCollectionPersister] done inserting collection: 1 rows inserted
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] Executing batch size: 1
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] post flush
2005-02-10 14:40:41,550 DEBUG [org.springframework.orm.hibernate.SessionFactoryUtils] Closing Hibernate session
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] closing session
2005-02-10 14:40:41,550 DEBUG [net.sf.hibernate.impl.SessionImpl] disconnecting session
2005-02-10 14:40:41,566 DEBUG [net.sf.hibernate.impl.SessionImpl] transaction completion
2005-02-10 14:40:41,566 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'mySubscriptionDAO'
2005-02-10 14:40:41,566 DEBUG [org.springframework.orm.hibernate.SessionFactoryUtils] Opening Hibernate session
2005-02-10 14:40:41,566 DEBUG [net.sf.hibernate.impl.SessionImpl] opened session
2005-02-10 14:40:41,566 DEBUG [net.sf.hibernate.impl.SessionImpl] find: FROM Subscription AS sub JOIN Subscription_Notification AS sn on sub.subscription_id = sn.subscription_id JOIN notification_type AS nt on sn.notification_
2005-02-10 14:40:41,566 DEBUG [net.sf.hibernate.engine.QueryParameters] named parameters: {}
2005-02-10 14:40:41,566 DEBUG [net.sf.hibernate.hql.QueryTranslator] compiling query
2005-02-10 14:40:41,566 DEBUG [org.springframework.orm.hibernate.SessionFactoryUtils] Closing Hibernate session
2005-02-10 14:40:41,566 DEBUG [net.sf.hibernate.impl.SessionImpl] closing session


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

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.