Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7623161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:38:16+00:00 2026-05-31T04:38:16+00:00

How could I replace the HQL query below using QueryOver API? var sql =

  • 0

How could I replace the HQL query below using QueryOver API?

var sql = "from Role r, Action a where r.Active = :active and a.Active = :active";
var result = manager.Session.GetISession().CreateQuery(sql)
            .SetBoolean("active", true).List();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:38:17+00:00Added an answer on May 31, 2026 at 4:38 am

    I don’t believe there’s a way to do this in QueryOver, since both JoinAlias and JoinQueryOver require an expression describing a path to the related entity.

    However, this is easy to accomplish in LINQ-to-NHibernate:

    var result = 
        (from role in manager.Session.GetISession().Query<Role>()
        from action in manager.Session.GetISession().Query<Action>()
        where role.Active == true && action.Active == true).ToList();
    

    With NH 3.2, here’s the SQL I get:

    select role0_.Id    as col_0_0_,
           action1_.Id as col_1_0_
    from   [Role] role0_,
           [Action] action1_
    where  role0_.IsActive = 1 /* @p0 */
           and action1_.IsActive = 1 /* @p1 */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just wondering how I could replace the second instance of a string inside
I want to use some Python libraries to replace MATLAB. How could I import
Could you guys give me an example how to read and write from/to xml
Can anyone recommend decent software that could replace a physical whiteboard, as used in
I am new to Mercurial and trying to figure out if it could replace
Is there anyway that I could replace the Alt+Click Binding of mylyn in eclipse.
I'm quite new on jquery and i was looking for something that could replace
In an answer to one of my questions, someone had posted: // could replace
I was wondering how I could replace this loop: while ($row=mysql_fetch_array($res)) by an for
Is there a formula without if/else/switch/? etc that could replace the solution[,] matrix and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.