GithubHelp home page GithubHelp logo

nhibernate.extensions's People

Contributors

ranzlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nhibernate.extensions's Issues

NHibernate.Glimpse does not show the value of xml parameters

I am using a DB2 database. Some of my fields are of type xml. When I issue insert or update commands referring to those xml fields, the generated SQL only shows the type and size of xml parameters, but I want to see what is the content of the xml paramter.
Look at p5 and p6 in the follwoing SQL (generated by Glimpse):

UPDATE Standard.DataTuples SET VersionNo = ?, Extra = ?, OrderNo = ?, TupleAction = ?, Timestamp = ?, XmlVariableValues = ?, XmlAmendments = ?, DatasetVersionRef = ? WHERE Id = ? AND VersionNo = ?; p0 = 3 [Type: Int32 (4)], p1 = NULL [Type: Xml (0)], p2 = 0 [Type: Int32 (4)], p3 = 0 [Type: Int32 (4)], p4 = 23-Oct-13 9:26:57 AM [Type: DateTime (16)], p5 = [Type: Xml (5374)], p6 = [Type: Xml (374)], p7 = 465 [Type: Int64 (8)], p8 = 638 [Type: Int64 (8)], p9 = 2 [Type: Int32 (4)]

NHibernate.Glimpse and log4net

When using NHibernate.Glimpse, none of the log4net appenders work anymore for the NHibernate loggers.

Any way to configure it to be able to use both NHibernate.Glimpse and log4net at the same time?

Thanks!

NHibernate.DependencyInjection with NHibernate 4.0.x

Hi,

is there a a version of this extension compatible with NHibernate 4.0.x ?
This one doesn't work. It throws this expcetion:

Method 'EmitMethodBody' in type 'NHibernate.DependencyInjection.Core.DefaultMethodEmitter' from assembly 'NHibernate.DependencyInjection, Version=3.3.3.4001, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Glimpse.NHibernate + async MVC Action = ArgumentNullException: httpContext

I have an MVC4 application storing documents in a database, and I have a very simple action for retrieving them in the form of ~/documents/view/{documentId}, and it works perfectly.

I have also made the action in my app utilize async in case of large documents

public async Task<ActionResult> View(Guid id)
{
    var getDocumentAsync = Task.Factory.StartNew(() => documentService.GetDocument(id));
    var document = await getDocumentAsync;
    if (document == null)
        return HttpNotFound();
    /* .... other logic ... */
    return File(document.Data, document.ContentType); //document.Data uses lazy loading, not sure if that's relevant yet...
}

This works great. But with the Glimpse.NHibernate pluin installed I get an error at the return File(...) line. If I remove Glimpse.NHibernate it goes away, if I convert my action to be a normal action, it goes away but with it, I get the following error with stacktrace. I'm assuming this is an issue with the Glimpse.NHibernate code not handling the way async works?

[ArgumentNullException: Value cannot be null.
Parameter name: httpContext]
   System.Web.HttpContextWrapper..ctor(HttpContext httpContext) +9658614
   Glimpse.AspNet.AspNetFrameworkProvider.get_Context() +89
   Glimpse.AspNet.AspNetFrameworkProvider.get_HttpRequestStore() +41
   Glimpse.Core.Framework.<>c__DisplayClass5.<InstantiateRuntimePolicyStrategy>b__4() +39
   NHibernate.Glimpse.InternalLoggers.SqlInternalLogger.Debug(Object message) +155
   HibernatingRhinos.Profiler.Appender.NHibernate3Logger.ProfilerLogger.Debug(Object message) +40
   NHibernate.AdoNet.Util.SqlStatementLogger.LogCommand(String message, IDbCommand command, FormatStyle style) +262
   NHibernate.AdoNet.Util.SqlStatementLogger.LogCommand(IDbCommand command, FormatStyle style) +44
   NHibernate.AdoNet.AbstractBatcher.LogCommand(IDbCommand command) +96
   NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +90
   NHibernate.Persister.Entity.AbstractEntityPersister.InitializeLazyPropertiesFromDatastore(String fieldName, Object entity, ISessionImplementor session, Object id, EntityEntry entry) +519
   NHibernate.Persister.Entity.AbstractEntityPersister.InitializeLazyProperty(String fieldName, Object entity, ISessionImplementor session) +702
   NHibernate.Intercept.AbstractFieldInterceptor.InitializeField(String fieldName, Object target) +130
   NHibernate.Intercept.AbstractFieldInterceptor.Intercept(Object target, String fieldName, Object value) +395
   NHibernate.Intercept.DefaultDynamicLazyFieldInterceptor.Intercept(InvocationInfo info) +391
   DocumentProxy.get_Data() +283
   MyAppNamespace.Web.Controllers.<View>d__12.MoveNext() in c:\Development\MyAppNamespace\Controllers\DocumentsController.cs:144
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +21
   lambda_method(Closure , Task ) +64
   System.Threading.Tasks.TaskHelpersExtensions.ThrowIfFaulted(Task task) +31
   System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +67
   System.Web.Mvc.Async.<>c__DisplayClass3f.<BeginInvokeAsynchronousActionMethod>b__3e(IAsyncResult asyncResult) +16
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +48
   Castle.Proxies.AsyncControllerActionInvokerProxy.EndInvokeActionMethod_callback(IAsyncResult asyncResult) +41
   Castle.Proxies.Invocations.AsyncControllerActionInvoker_EndInvokeActionMethod.InvokeMethodOnTarget() +103
   Castle.DynamicProxy.AbstractInvocation.Proceed() +117
   Glimpse.Core.Extensibility.CastleInvocationToAlternateMethodContextAdapter.Proceed() +48
   Glimpse.Mvc.AlternateType.EndInvokeActionMethod.NewImplementation(IAlternateMethodContext context) +152
   Glimpse.Core.Extensibility.AlternateTypeToCastleInterceptorAdapter.Intercept(IInvocation invocation) +183
   Castle.DynamicProxy.AbstractInvocation.Proceed() +483
   Castle.Proxies.AsyncControllerActionInvokerProxy.EndInvokeActionMethod(IAsyncResult asyncResult) +203
   System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +57
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +48
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +102
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +129

NHibernate.Glimpse SQL count on History tab?

Hi,

is it currently possible (or could be easily made) to put a sql counter directly on the default History and Ajax Glimpse tabs.

I'm asking because I have a lot of ajax requests. And to see if my queries are efficient I have to "Inspect" requests one by one, change to NHibernate tab, and see how many queries are being fired.

It would be a huuuuge time saver if I could see all counts on one screen so I can just inspect the ones that seem suspicious.

NHibernate Factory Statistics in NHibernate.Glimpse

When there are no requests received the NHibernate Factory Statistics do not appear at all in the plugin tab.

For example, if all the queries were retrieved from level 2 cache all is shown is:

No data found for this plugin.

It would be nice if the statistics were shown there all the time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.