1 Reply Latest reply on Oct 12, 2007 8:56 AM by pmuir

    Hibernate Naming Strategy

    ralscha

      Hi

      I'm looking for a way to configure a naming strategy in a Hibernate Session factory (components.xml)

      The class org.jboss.seam.persistence.HibernateSessionFactory contains an attribute namingStrategy. But there is no xml element for this attribute.

      There is one for each of the other attributes, but not for namingStrategy

      <persistence:cfg-properties />
      <persistence:mapping-classes />
      <persistence:mapping-files />
      <persistence:mapping-jars />
      <persistence:mapping-packages />
      <persistence:mapping-resources />



      Is there an other way to inject the naming strategy into the session factory?

      Regards
      Ralph

        • 1. Re: Hibernate Naming Strategy
          pmuir

          You can't set the naming strategey from components.xml due to a limitation in passing in objects. If you are using JPA you can set it in persistence.xml, otherwise grab the hibernateSessionFactory on startup and set it in code