I'm currently evaluating WaveMaker for a project at work and am experiencing trouble performing a foreign key lookup. I'm running WaveMaker 6.7 and connecting to an Oracle Database 10g instance.
My project involves designing a pretty simple "Project Approval" screen. In WaveMaker's implementation, it should consist of a DojoGrid associated with the RequestApproval table and a LiveForm associated with the selected element in the table providing CRUD operations on that element.
Each row in the RequestApproval table represents a task in a project. The table includes a nullable StaffAssigned column that indicates which staff member is assigned to a task. To validate new entries and preserve data integrity, the StaffAssigned column is a foreign key into the Respinit table, the primary key of which defines all staff members. The foreign key is defined in the database, and on import WaveMaker assigns it a cardinality of "to-zero-or-one" (because, I think, the StaffAssigned column is nullable).
My problem is that not all the conveniences WaveMaker should provide me now that Hibernate has a mapping of the relationship are available to me. As long as that foreign key is defined on the StaffAssigned column, the column will not appear in the DojoGrid. None of the associated columns from the Respinit table appear as selectable in the "Edit columns" dialog of the DojoGrid either. (Perhaps this is because WaveMaker wouldn't know what to display when StaffAssigned is null?) No Lookup editor appears by default in the LiveForm, but when I drag one over from the Pallete the new editor is automatically associated with the foreign key and will auto-populate with values from the Respinit table when I run my app.
Here's the defintion of the RequestApproval table in Hibernate:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.db105ddb.data.RequestApproval" table="REQUEST_APPROVAL" schema="VRT" dynamic-insert="false" dynamic-update="false">
<id name="requestApprovalId" type="integer">
<column name="REQUEST_APPROVAL_ID" precision="9"/>
<generator class="assigned"/>
</id>
<property name="REQUESTNUM" type="integer">
<column name="REQUESTNUM" precision="8" not-null="true"/>
</property>
<property name="taskDescription" type="string">
<column name="TASK_DESCRIPTION" length="2000"/>
</property>
<property name="whoRequestedApproval" type="string">
<column name="WHO_REQUESTED_APPROVAL" length="6"/>
</property>
<property name="dateRequested" type="date">
<column name="DATE_REQUESTED" length="7"/>
</property>
<property name="dateApproved" type="date">
<column name="DATE_APPROVED" length="7"/>
</property>
<property name="WHO_APPROVED" type="string">
<column name="WHO_APPROVED" length="6"/>
</property>
<many-to-one name="respinitByStaffAssigned" class="com.db105ddb.data.Respinit" cascade="none">
<column name="STAFF_ASSIGNED" length="6"/>
</many-to-one>
</class>
</hibernate-mapping>
And here's the definition of the Respinit table:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.db105ddb.data.Respinit" table="RESPINIT" schema="VRT" dynamic-insert="false" dynamic-update="false">
<id name="respinit" type="string">
<column name="RESPINIT" length="6"/>
<generator class="assigned"/>
</id>
<property name="rname" type="string">
<column name="RNAME" length="40"/>
</property>
<property name="rnameaddr" type="string">
<column name="RNAMEADDR" length="40"/>
</property>
<property name="raddr1" type="string">
<column name="RADDR1" length="40"/>
</property>
<property name="raddr2" type="string">
<column name="RADDR2" length="40"/>
</property>
<property name="rcity" type="string">
<column name="RCITY" length="40"/>
</property>
<property name="rstate" type="string">
<column name="RSTATE" length="20"/>
</property>
<property name="rzip" type="string">
<column name="RZIP" length="20"/>
</property>
<property name="homephone" type="string">
<column name="HOMEPHONE" length="20"/>
</property>
<property name="extension" type="string">
<column name="EXTENSION" length="5"/>
</property>
<property name="department" type="string">
<column name="DEPARTMENT" length="20"/>
</property>
<property name="cgroup" type="string">
<column name="CGROUP" length="10"/>
</property>
<property name="emailaddress" type="string">
<column name="EMAILADDRESS" length="1024"/>
</property>
<set name="requestApprovalsForStaffAssigned" inverse="true" cascade="">
<key>
<column name="STAFF_ASSIGNED" length="6"/>
</key>
<one-to-many class="com.db105ddb.data.RequestApproval"/>
</set>
</class>
</hibernate-mapping>
I would really like my StaffAssigned column to show up in my DojoGrid, and I'm not sure why it's not. Other foreign key lookups I've done with Wavemaker work as expected. Can anyone tell if I've done something wrong in my configuration? Is my approach non-standard in some way? Any help will be greatly appreciated and I will happily provide any additional information on request.
I found the answer buried in their documentation. If one needs to view/edit related data, you have to use a LiveView instead of a LiveTable. Here's a link to the Wayback Machine's archive of the documentation in question since their website has been down all week.
Related
Even if the operation seems to be extremely frequently used I haven't found where is the problem in my code.
In DAO class I have:
public class ItemDaoImpl extends HibernateDaoSupport implements ItemDao {
#Transactional
public void addItem(Item item){
getSessionFactory().getCurrentSession().save(item);
}
#Transactional(readOnly = true)
public List<Item> findAllItem(){
return getSessionFactory().getCurrentSession().createQuery("from Item").list();
}}
findAllItem() works well, whereas addItem() doesn't. When I click a button that invokes addItem() the following error is thrown:
java.lang.ClassCastException: com.z.item.model.Item cannot be cast to java.util.Map
javax.faces.el.EvaluationException: java.lang.ClassCastException: com.z.item.model.Item cannot be cast to java.util.Map
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:98)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
at javax.faces.component.UICommand.broadcast(UICommand.java:311)
.
.
.
But I haven't specified any Map as I use the object "Item" everywhere. Item object that is passed to addItem() is also correct. Why is this exception thrown?
Here is how I configure it:
<hibernate-mapping>
<class entity-name="com.z.item.model.Item"
table="item">
<id name="id" type="long">
<column name="ID" />
<generator class="identity" />
</id>
<property name="name" type="string">
<column name="ITEMNAME" length="45" not-null="true" />
</property>
<property name="amount" type="int">
<column name="AMOUNT" not-null="true" />
</property>
<property name="price" type="java.math.BigDecimal">
<column name="PRICE" length="10" not-null="true" />
</property>
</class>
</hibernate-mapping>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
<bean id="itemDao"
class="com.z.item.dao.impl.ItemDaoImpl" >
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/z/item/hibernate/Item.hbm.xml</value>
</list>
</property>
</bean>
I don't think this is an issue caused with Hibernate. The issue may already have happened when you click the button and BEFORE reaching addItem(). Most likely, it is data mapping issue(I assume you map some data to Item first when clicking the button). Try to print out item before you call addItem(), you should see above exception even not calling addItem().
For the #Transactional annotation you need to specify your write (save and delete) DAO methods with false and your read (get and load) methods with true.
The #Transactional is simply adding certain meta data for the method or class about whether the transaction is read only or write or whether it requires a new transaction etc.. for more information on the #Transactional annotation please read here.
#Transactional(readOnly=false)
public void addItem(Item item){
getSessionFactory().getCurrentSession().save(item);
}
#Transactional(readOnly=true)
public List<Item> findAllItem(){
return getSessionFactory().getCurrentSession().createQuery("from Item").list();
}
Also, you should change your mapping to use <class name="Item" table="item"> instead of <class entity-name="com.z.item.model.Item" table="item">. This mapping allows you to access the data as a dom4j tree, or as a graph of property name/value pairs or java Maps. Specifying only an XML mapping without any associated class. The property names are purely logical constructs that can be referred to in HQL queries. See the hibernate doco for more info.
entity-name (optional - defaults to the class name): Hibernate3 allows
a class to be mapped multiple times, potentially to different tables.
It also allows entity mappings that are represented by Maps or XML at
the Java level. In these cases, you should provide an explicit
arbitrary name for the entity. See Section 4.4, “Dynamic models” and
Chapter 18, XML Mapping for more information.
Actually, there were a couple of things I did to make this code working.
I've changed my dao method to:
#Transactional(readOnly=false)
public void addItem(Item item){}
I've modified cglib version in pom.xml from 2.2. to 2.1.
I've changed the configuration to:
<class name="pl.outbox.item.model.Item" table="item">
<id name="id" type="int">
<column name="ID" />
<generator class="increment"/>
</id>
I have following structure.
1) GroupMember.cs
public class GroupMember
{
public virtual int Id { get; set; }
public virtual SystemUser User { get; set; }
public virtual Group Group { get; set; }
public virtual IList<Group> GroupDetail { get; set; }
public virtual IList<SystemUser> SystemUserDetail { get; set; }
// Few more Properties are there
}
2) SystemUser.cs
public class SystemUser
{
public virtual int Id{get;set;}
public virtual string DisplayName{get;set;}
// Few more Properties are there
}
Nhibernate files
GroupMembers
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NSP.DataModel"
namespace="NSP.DataModel.Account">
<class name="GroupMember" entity-name="SysGroupMember" table="SYS_DEF_GROUP_MEMBERS">
<id name="Id" column="id" type="Int32">
<generator class="identity"/>
</id>
<many-to-one entity-name="SysGroup" name="Group" column="GroupID" not-null="true" cascade="none"/>
<many-to-one entity-name="SysUser" name="User" column="UserID" not-null="false" cascade="none"/>
<property name="Status" type="int" not-null="false">
<column name="Status" not-null="false"/>
</property>
<property name="CreatedDate" type="datetime" not-null="false">
<column name="CreatedDate"/>
</property>
<property name="CreatedBy" type="int" not-null="false">
<column name="CreatedBy"/>
</property>
<property name="UpdatedDate" type="datetime" not-null="false">
<column name="UpdatedDate"/>
</property>
<property name="UpdatedBy" type="int" not-null="false">
<column name="UpdatedBy"/>
</property>
<bag name="GroupDetail" inverse="true">
<key column="Id"/>
<one-to-many entity-name="SysGroup"/>
</bag>
<bag name="SystemUserDetail">
<key column="Id"/>
<one-to-many entity-name="SysUser"/>
</bag>
</class>
</hibernate-mapping>
SysUser
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NSP.DataModel" namespace="NSP.DataModel.Authentication">
<class name="SystemUser" entity-name="SysUser" table="SYS_DEF_USER" abstract="true">
<id name="Id" column="id" type="Int32">
<generator class="identity"/>
</id>
<many-to-one entity-name="SysUserTypes" name="UserTypeId" column="UserTypeId" not-null="true" cascade="none" />
<property name="IsActive" column="IsActive" type="Boolean" not-null="true"/>
<property name="IsLicensed" column="IsLicensed" type="Boolean" not-null="true"/>
<property name="DisplayName" type="string" not-null="false">
<column name="DisplayName" length="128"/>
</property>
<property name="Email" column="Email" type="string" not-null="true" length="200"/>
<property name="PasswordMD5HexHash" column="PasswordMD5HexHash" type="string" not-null="false"/>
<bag name="UserTypeList" inverse="true">
<key column="UserTypeId"/>
<one-to-many entity-name="SysUserTypes"/>
</bag>
</class>
</hibernate-mapping>
I want to get the result using this query
select * from sys_def_user where id not in (select UserId from SYS_DEF_GROUP_MEMBERS where GroupID =5)
What can be the nhibernate syntax for this? Please its urget...
You can use NHibernate's LINQ provider for this. The examples listed here, http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b, are a good starting point for learning LINQ. Most of those examples are written in the from ... select syntax, but I prefer the extension method syntax:
var subquery = session.Query<GroupMember>()
.Where(gm => gm.Group.Id == 5)
.Select(gm => gm.User.Id);
var users = session.Query<User>()
.Where(u => !subquery.Contains(u.Id));
Hopefully this example will get you started on the right track, and you'll be writing your own LINQ queries in no time.
I'm learning spring hibernate zk stack, and doing my first crud following this tutorial
I put applicationContext.xml into webapp/WEB-INF, and .hbm.xml to resources/mappings
But I dont know why my hbm files keep showing can not find my pojos.
in github https://github.com/kossel/firstzk
I have this structure
applicationContext.xml
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- set other Hibernate properties in hibernate.cfg.xml file -->
<property name="configLocation" value="classpath:/com/iknition/firstzk/hibernate/hibernate.cfg.xml" />
</bean>
hibernate.cfg.xml
<mapping resource="com/iknition/firstzk/hibernate/Company.hbm.xml" />
<mapping resource="com/iknition/firstzk/hibernate/Contact.hbm.xml" />
Company.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.iknition.firstzk.beans">
<class name="Contact" table="contact">
<id name="idcontact" column="idcontact" type="integer">
<generator class="increment" />
</id>
<property name="name" column="name" type="string" />
<property name="email" column="email" type="string" />
<many-to-one name="company" column="companyId" class="com.iknition.firstzk.beans.Company" outer-join="true" />
</class>
</hibernate-mapping>
Contact.hbm.xml:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.iknition.firstzk.beans">
<class name="Contact" table="contact">
<id name="idcontact" column="idcontact" type="integer">
<generator class="increment" />
</id>
<property name="name" column="name" type="string" />
<property name="email" column="email" type="string" />
<many-to-one name="company" column="companyId" class="com.iknition.firstzk.beans.Company" outer-join="true" />
</class>
</hibernate-mapping>
UPDATE:
I have reference to contact.hbm.xml too, I missed to put it here.
by "why my hbm files keep showing can not find my pojos" I mean, when I try to build the application, I keep getting error of "Caused by: org.hibernate.MappingException: entity class not found: com.iknition.firstzk.beans.Contact" I have changed many times the location of those configuration files, and still getting same error.
Hmmm... never tried using an external hibernate.cfg.xml. But I think specifying that only loads the properties. You might still need to set the mapping in a separate property.
Here's what my config usually looks like:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<bean
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="propertiesArray">
<list>
<props>...</props>
</list>
</property>
</bean>
</property>
<property name="mappingLocations" value="classpath:com/iknition/firstzk/hibernate/*.hbm.xml"/>
</bean>
I think you have to specify mappingLocations one-by-one like:
<property name="mappingLocations">
<util:list>
<value>hibernate/Company.hbm.xml</value>
<value>hibernate/Contact.hbm.xml</value>
</util:list>
</property>
Hello,
i have simple J2EE application that shows first 100 Employee records from db (Oracle DB) with Hibernate (version 3). All of the tables have about 10000 records. There are Country(id, name), City(id, name, country_id), Address(id, address, city_id), Company(id, name), Office(id, company_id, address_id), Employee(id, name, address_id), Position(id, name) and Employee_Position_Office(employee_id, position_id, office_id) in db. And i have some problems with batch-size. I need to do it in 4 sql-request (generated by Hibernate). Let's show you what i have:
In my class-mappings i set batch-size=100 and Hibernate creates 3 sql-request for Employee, OfficePosition and Address loading, look:
select * from ( select employee0_.ID as ID6_, employee0_.NAME as NAME6_, employee0_.ADDRESS as ADDRESS6_ from EMPLOYEE employee0_ ) where rownum <= ?
select officeposi0_.EMPLOYEE_ID as EMPLOYEE1_6_1_, officeposi0_.POSITION_ID as POSITION2_1_, officeposi0_.OFFICE_ID as OFFICE3_1_, position1_.ID as ID5_0_, position1_.NAME as NAME5_0_ from EMPLOYEE_POSITION_OFFICE officeposi0_ inner join POSITION position1_ on officeposi0_.POSITION_ID=position1_.ID where officeposi0_.EMPLOYEE_ID in (100x ?)
select address0_.ID as ID2_2_, address0_.ADDRESS as ADDRESS2_2_, address0_.CITY_ID as CITY3_2_2_, city1_.ID as ID1_0_, city1_.NAME as NAME1_0_, city1_.COUNTRY_ID as COUNTRY3_1_0_, country2_.ID as ID0_1_, country2_.NAME as NAME0_1_ from ADDRESS address0_ left outer join CITY city1_ on address0_.CITY_ID=city1_.ID left outer join COUNTRY country2_ on city1_.COUNTRY_ID=country2_.ID where address0_.ID in (100x ?)
And if i change batch-size to number more than 100 nothing changes - this is good.
But then (after these requests) Hibernate generates request(s) for Office loading, and i have some problems with it, let's show you:
My 100 first Employees work in 397 offices (randomly generated) and Hibernate should loads they with 1 request when batch-size is more than 397, when i set batch-size to 397 it works fine (in 1 sql-request),
select office0_.ID as ID4_4_, office0_.COMPANY_ID as COMPANY2_4_4_, office0_.ADDRESS_ID as ADDRESS3_4_4_, (SELECT COUNT(*) FROM EMPLOYEE_POSITION_OFFICE
E WHERE
E.OFFICE_ID=office0_.ID)
as formula0_4_, company1_.ID as ID3_0_, company1_.NAME as NAME3_0_, address2_.ID as ID2_1_, address2_.ADDRESS as ADDRESS2_1_, address2_.CITY_ID as CITY3_2_1_, city3_.ID as ID1_2_, city3_.NAME as NAME1_2_, city3_.COUNTRY_ID as COUNTRY3_1_2_, country4_.ID as ID0_3_, country4_.NAME as NAME0_3_ from OFFICE office0_ left outer join COMPANY company1_ on office0_.COMPANY_ID=company1_.ID left outer join ADDRESS address2_ on office0_.ADDRESS_ID=address2_.ID left outer join CITY city3_ on address2_.CITY_ID=city3_.ID left outer join COUNTRY country4_ on city3_.COUNTRY_ID=country4_.ID where office0_.ID in (397x ?)
but when i set any another number (less or more than 397) Hibernate generates several sql-requests with same "body" but others "tails".
For example, there are results when batch-size = 400.
...in (200x ?)
...in (100x ?)
...in (50x ?)
...in (25x ?)
...in (12x ?)
...in (10x ?)
Tell, please, what i do wrong and can it be fixed. Thx.
My mappings:
<class name="---.Address" table="ADDRESS"
batch-size="100">
<id name="id" type="long">
<column name="ID" />
<generator class="increment" />
</id>
<property name="address" type="java.lang.String">
<column name="ADDRESS" />
</property>
<many-to-one name="city" class="---.City"
fetch="join">
<column name="CITY_ID" />
</many-to-one>
</class>
<class name="---.City" table="CITY">
<id name="id" type="long">
<column name="ID" />
<generator class="increment" />
</id>
<property name="name" type="java.lang.String">
<column name="NAME" />
</property>
<many-to-one name="country" class="---.Country"
fetch="join">
<column name="COUNTRY_ID" />
</many-to-one>
</class>
<class name="---.Company" table="COMPANY">
<id name="id" type="long">
<column name="ID" />
<generator class="increment" />
</id>
<property name="name" type="java.lang.String">
<column name="NAME" />
</property>
</class>
<class name="---.Country" table="COUNTRY">
<id name="id" type="long">
<column name="ID" />
<generator class="increment" />
</id>
<property name="name" type="java.lang.String">
<column name="NAME" />
</property>
</class>
<class name="---.Employee" table="EMPLOYEE"
batch-size="100">
<id name="id" type="long">
<column name="ID" />
<generator class="increment" />
</id>
<property name="name" type="java.lang.String">
<column name="NAME" />
</property>
<many-to-one name="address" class="---.Address"
fetch="join">
<column name="ADDRESS" unique="true" />
</many-to-one>
<map name="officePositions" table="EMPLOYEE_POSITION_OFFICE" lazy="false"
fetch="join" batch-size="100">
<key>
<column name="EMPLOYEE_ID"></column>
</key>
<map-key-many-to-many class="---.Office">
<column name="OFFICE_ID">
</column>
</map-key-many-to-many>
<many-to-many column="POSITION_ID"
class="---.Position" />
</map>
</class>
<class name="---.Office" table="OFFICE"
batch-size="400">
<id name="id" type="long">
<column name="ID" />
<generator class="increment" />
</id>
<many-to-one name="company" class=---.Company"
fetch="join">
<column name="COMPANY_ID" />
</many-to-one>
<many-to-one name="address" class="---.Address"
fetch="join">
<column name="ADDRESS_ID" />
</many-to-one>
<property name="collegues">
<formula>
SELECT COUNT(*) FROM EMPLOYEE_POSITION_OFFICE
E WHERE
E.OFFICE_ID=ID
</formula>
</property>
</class>
<class name="---.Position" table="POSITION">
<id name="id" type="long">
<column name="ID" />
<generator class="increment" />
</id>
<property name="name" type="java.lang.String">
<column name="NAME" />
</property>
</class>
Hibernate cfg:
<hibernate-configuration>
<session-factory>
<property name="connection.url">jdbc:oracle:thin:#localhost:1521:xe</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.username">---</property>
<property name="connection.password">----</property>
<property name="connection.pool_size">10</property>
<property name="current_session_context_class">thread</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.use_sql_comments">false</property>
<property name="hibernate.format_sql">false</property>
<property name="hibernate.show_sql">true</property>
<mapping resource="---/Country.hbm.xml" />
<mapping resource="---/City.hbm.xml" />
<mapping resource="---/Address.hbm.xml" />
<mapping resource="---/Company.hbm.xml" />
<mapping resource="---/Office.hbm.xml" />
<mapping resource="---/Position.hbm.xml" />
<mapping resource="---/Employee.hbm.xml" />
</session-factory>
I have a very simple mapping file (se below) and a simple class.
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Domain"
namespace="Domain" default-access="field.camelcase-underscore"
default-lazy="true">
<class name="PricePropStateView" table="V_PRICE_PROP_STATES">
<id name="PriceId" column="PRICE_ID" type="long" />
<property name="DetailId" column="DETAILS_ID" type="long" />
<property name="Moe" column="MOE" type="string" />
<property name="PropId" column="PROP_ID" type="long" />
<property name="PoQteId" column="PO_QTE_ID" type="string" />
<property name="PoLineItemId" column="LINE_ITEM_ID" type="string" />
<property name="PropState" column="PROP_STATE" type="string" />
</class>
</hibernate-mapping>
The class represents a data set returned by a View in Oracle. The performance is very slow. When executed in Toad for Oracle, the result set is returned in less than a second. When using
DetachedCriteria criteria =
DetachedCriteria.For<PricePropStateView>()
.Add(Restrictions.Eq("PoQteId", aQuoteName));
return FindAll(criteria).ToList();
It is very slow...almost 29 seconds. Any ideas> Thanks