I guess this is all generated. 

-----Original Message-----
From: sionsmith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 21, 2007 9:39 AM
To: users@appfuse.dev.java.net
Subject: [appfuse-user] RE: Did I miss a Spring Config??


can you post your config mate? 

Clark D. Liu wrote:
> 
> More info - I'm using appfuse 1.9.4 and used appgen to generate the
> classes.  
> 
>  
> 
> ________________________________
> 
> From: Clark D. Liu [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 21, 2007 3:59 AM
> To: users@appfuse.dev.java.net
> Subject: [appfuse-user] Did I miss a Spring Config??
> 
>  
> 
> I added a new method to my DAO that uses a where clause as follows...
> 
> public List getUploadedDatasByRegion(String region) {
> 
>             return getHibernateTemplate().find("from UploadedData
where
> region=?",region);
> 
>  
> 
> Hibernate returns two rows but the action shows null...
> 
> UploadedDataManager mgr =
> (UploadedDataManager)getBean("uploadedDataManager");
> 
> List datas = mgr.getUploadedDatas(uploadedData);
> 
>  
> 
> ... so I am guessing I don't have Spring setup correctly? All other
CRUD
> operation work though! Any help would be greatly appreciated!!
> 
>  
> 
> Clark
> 
>  
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Did-I-miss-a-Spring-Config---tf3265741s2369.html#a
9083057
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>

    <!-- Hibernate SessionFactory -->
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="mappingResources">
            <list>
                <value>org/midwestreliability/model/Role.hbm.xml</value>
                <value>org/midwestreliability/model/User.hbm.xml</value>
                <value>org/midwestreliability/model/UploadedData.hbm.xml</value>
                <value>org/midwestreliability/model/Violation.hbm.xml</value>
            </list>
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
                <prop key="hibernate.query.substitutions">true 'Y', false 'N'</prop>
                <!-- Create/update the database tables automatically when the JVM starts up
                <prop key="hibernate.hbm2ddl.auto">update</prop> -->
                <!-- Turn batching off for better error messages under PostgreSQL 
                <prop key="hibernate.jdbc.batch_size">0</prop> -->
            </props>
        </property>
    </bean>

    <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

    <!-- Generic Dao - can be used when doing standard CRUD -->
    <bean id="dao" class="org.midwestreliability.dao.hibernate.BaseDaoHibernate">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

    <!-- LookupDao: Hibernate implementation -->
    <bean id="lookupDao" class="org.midwestreliability.dao.hibernate.LookupDaoHibernate">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

    <!-- UserDao: Hibernate implementation -->
    <bean id="userDao" class="org.midwestreliability.dao.hibernate.UserDaoHibernate">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

    <!-- RoleDao: Hibernate implementation -->
    <bean id="roleDao" class="org.midwestreliability.dao.hibernate.RoleDaoHibernate">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

    <!-- Add new Daos here -->
	<!--UploadedData-START-->
    <bean id="uploadedDataDao" class="org.midwestreliability.dao.hibernate.UploadedDataDaoHibernate" autowire="byName"/>
    <!--UploadedData-END-->
    <!--Violation-START-->
    <bean id="violationDao" class="org.midwestreliability.dao.hibernate.ViolationDaoHibernate" autowire="byName"/>
    <!--Violation-END-->
</beans>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to