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 304271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:15:53+00:00 2026-05-12T07:15:53+00:00

I am trying out some cascade options with nhibernate mapping and have a unit

  • 0

I am trying out some cascade options with nhibernate mapping and have a unit test where I’d like to use a tool to inspect the state of the database. I was hoping I could use linqpad to do this, but the connection seems hung while in the debugger. I’d seen a demo not to long ago where SSMS was being used to inspect the db during a debug, so I’m wondering if I should be able to somehow use linqpad or if I need a different tool (I haven’t installed SSMS on my laptop and would prefer something more light weight).

Unrelated to linqpad, my motivation for doing this is I am not sure if the db state I’m validating in a unit test is from the db or from nhibernate’s cache? If Session.Flush() is called before the the assert, does that mean a fetch in an assert is guaranteed to be coming from the db?

Cheers,
Berryl

  • 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-12T07:15:54+00:00Added an answer on May 12, 2026 at 7:15 am

    To the second part of your question – Yes, calling session.flush() before any kind of fetch will push everything out to the DB. You could also do:

    Transaction t = session.beginTransaction();
    //some hibernate interaction test code
    t.commit()
    //you can rest assured that any code coming from the hibernate now will
    //be exactly what is in the db.
    

    hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Riak Search node running and am trying out some test queries
I have just started learning Erlang and am trying out some Project Euler problems
I was trying out some dummy application just to test binding modes. So, just
Am new to RoR paperclip gem and i have been trying out some examples
I'm quite new to openGL and I have been trying out some sample codes
I'm trying out some webkit transitions on a site and have come across a
I have been trying out some basic exercises involving loops. Can someone tell me
I have been trying out some LINQ query can someone please show how to
I'm back at trying out some Android dev again. I have an old HTC
I am learning QT and trying out some examples. I am trying to make

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.