
I need to get the Date, DataQuantity, FeetQuantity of the ProductionbyEmployee table and based a OperatorNum on the Employee table. the number of operations is a parameter and using NHibernate
hql query. Nhibernate 3.2
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Usually, one uses an ORM in order to load and persist objects to relational databases in as transparent a way as possible. While it is possible to create projections of specific parts of the data, it seems like in your scenario you want to fetch an Employee entity with a specific OperatorNum, and then inspect some that Employee’s production metrics.
Important to note is that HQL queries are declared against the names and property names of your domain objects, not against the database table and column names.
If your entities and their properties are named identically to your tables and columns, it would look like this:
(I realize that this may not be exactly what you are asking for; it is difficult for me to tell what you are trying to achieve without knowing what your entities or mappings look like.)