facebook

Spring MVC scaffolding

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #313862 Reply

    n99
    Member

    Hello

    Looking at this page http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/orm.html#orm-introduction

    It says that spring supports “integration with Hibernate, Java Persistence API (JPA), Java Data Objects (JDO) and iBATIS SQL” and the section below on “Implementing DAOs based on plain Hibernate 3 API” shows how sessionFactorys are wired into the DAO and a org.springframework.orm.hibernate3.HibernateTransactionManager is also used.

    Running the MVC Scaffolding CRUD wizards generates DAOS that use org.skyway.spring.util.dao.AbstractJpaDao and bear no relation to the spring docs.

    Am I missing something here. When I add Spring and hibernate capabilities to a myelipse project I get generated DAOs that look more like the proing docs.

    How do I do get Spring 3 to use Hibernate 3 as described in the springs docs with the MVC Scaffolding?

    Cheers for any advice

    #314004 Reply

    jayperkins
    Member

    The DAO’s generated during scaffolding are JPA Dao’s. Although hibernate is the underlying jpa provider, none of the generated code is hibernate specific. The section “Implementing DAOs based on plain JPA” in the referenced documentation would better characterize the dao code generated during scaffolding.

    The AbstractJpaDao class simply contains code that is common to all jpa dao’s (like storing merging, deleting, etc) with some helper methods to execute named queries.
    It is packaged in the skyway-utils.jar file which is open source and can be easily be found and reviewed from a public maven repo:
    http://mvnrepository.com/artifact/org.skywaysoftware/skyway-spring-utils

    Please post back if you have any questions, feedback, etc.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Spring MVC scaffolding

You must be logged in to post in the forum log in