1 Reply Latest reply on Oct 19, 2007 10:28 AM by youngyang

    MS SQL View as Entity?

    mheidt

      Hello,

      I have a xml-based hibernate library and thought of using it within seam.
      But when I want to use EJB3, I assume, that I need an anotation-based description.

      But now I have the issue that all MS SQL Views (CREATE VIEW...) aren't found:

      Reason: javax.persistence.PersistenceException:
      org.hibernate.HibernateException: Missing table: TestView

      The same code using an existing TestTable in @Table(name="TestTable") works.
      Hence the schema and catalog in the persistence.xml is correct...

      The xml-based notation works as well:

      <hibernate-mapping>
       <class name="com.dcx.tscm.db.ComponentSets" table="ComponentSets" schema="dbo" catalog="tscm">



      Did anybody manage to get a MS SQL View as annotated entity bean?

      The ms-sql driver is jtds-1.2.jar

      Kind regards,
      Markus