[nhusers] queryover trunc date in oracle

2011-12-30 Thread Visar Uruqi
Hi I have this query over caseIDs.WhereRestrictionOn(x => x.DateOfAction). IsBetween(dateAction_from).And(dateAction_to) and also at the mapping file I use formula = "trunc(DateOfAction)" it produces this sql WHERE trunc(this_0_.DateOfAction) between TIMESTAMP '2011-

[nhusers] Re: nhibernate 3.2 with oracle ,method take only works well when the param is the end index of current page

2011-12-05 Thread Visar Uruqi
Hi I had a similiar problem. I'm using NH 3.2 and indeed it returns 0 rows. before = var lista = session.QueryOver .Take(PageSize) .Skip(page * PageSize) .List(); NO RESULTS0 RECORDS I looked at the NHprof profiler and analyzed the select statement that was made to oracle... and I solv

[nhusers] Joining with ICriteria and fetching eagerly

2011-02-10 Thread Visar Uruqi
Hi I have the following Scenario... INVOICE | -->ITEMS (ISet) mapping: INVOICE Everything is fine and good but I'm having a problem with querying some specific scenario. SCENARIO: Client wants INVOICE'S THAT HAVE A CERTAIN ITEM WITH A CERTAIN DESCRIPTION var

[nhusers] Re: Processing technique in the Unit Of Work

2010-10-18 Thread Visar Uruqi
n Oct 18, 10:06 am, Oskar Berggren wrote: > Too little context I'm afraid. The code in the link mentions threads. > What threads? What are you trying to do? > > /Oskar > > 2010/10/18 Visar Uruqi : > > > Is there a better way to do the same? > > > Click the i

[nhusers] Processing technique in the Unit Of Work

2010-10-18 Thread Visar Uruqi
Is there a better way to do the same? Click the image below to see what I mean (read the coment lines in the image): http://www.probit-kos.com/images/example2.png What do you recommend me to do? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To po

[nhusers] The best way to use a session in a winform application?

2010-10-15 Thread Visar Uruqi
default I do it during session creation Visar Uruqi -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegro

[nhusers] Re: 'date' function does not work in SQL Server 2008

2010-06-06 Thread Visar Uruqi
Just in case someone needs it, as Dijego said full type name, including the assembly name, in my case the name of assembly is just Entities so the dialect would be Entities.DbTools.Sql2008Dialect, Entities On Jun 6, 8:10 pm, Visar Uruqi wrote: > Thank you very much Diego, yes it did funct

[nhusers] Re: 'date' function does not work in SQL Server 2008

2010-06-06 Thread Visar Uruqi
 Diego > > > > On Sun, Jun 6, 2010 at 14:30, Visar Uruqi wrote: > > I figured this out, the release of NHibernate.dll that I had in > > my project did not had implemented the 'date' function in > > MsSql2000Dialect > > I looked through ILDASM.exe disass

[nhusers] Re: 'date' function does not work in SQL Server 2008

2010-06-06 Thread Visar Uruqi
lyQualifiedTypeName name, Boolean throwOnError) at NHibernate.Util.ReflectHelper.ClassForName(String name) at NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) InnerException Can you help? Visar On Jun 6, 12:35 pm, Visar Uruqi wrote: > Hi > > I have a problem with HQL, the d

[nhusers] 'date' function does not work in SQL Server 2008

2010-06-06 Thread Visar Uruqi
Hi I have a problem with HQL, the date function is not working, it is throwing the exception below: I'm using a simple query to get only the date from the DateTime field: select date(t.Data) from Trajtimi t where t.Pacienti.ID = 3 I'm using "NHibernate.Dialect.MsSql2000Dialect" I've tried with Ms

[nhusers] Re: My test fails on Concurrency Violation using optimistic concurrency

2010-04-24 Thread Visar Uruqi
, Paco Wensveen wrote: > It's happening because you use one session with the object still in > first level cache. p1.ReferenceEquals(p2) == true. > > > > > > On Sat, Apr 24, 2010 at 5:43 PM, Visar Uruqi wrote: > > I'm using optimistic concurrency, Version integ

[nhusers] My test fails on Concurrency Violation using optimistic concurrency

2010-04-24 Thread Visar Uruqi
I'm using optimistic concurrency, Version integer, my following test fails, I don't know why [Test] [ExpectedException(typeof(NHibernate.StaleObjectStateException))] public void CanThrowExceptionOnConcurrencyViolationUpdate() { Person p = new Person()

[nhusers] Re: How to encrypt the "connection string" in nhibernate.cfg.xml

2010-04-21 Thread Visar Uruqi
Just for the record, I found this article http://japikse.blogspot.com/2008/06/custom-connection-provider-with.html explaining the Custom Connection provider for nhibernate, if you want to handle the encryption yourself. Visar Uruqi On Apr 21, 4:07 pm, Visar Uruqi < visar.ur...@gmail.com>

[nhusers] Re: How to encrypt the "connection string" in nhibernate.cfg.xml

2010-04-21 Thread Visar Uruqi
desktop apps, but is completely transparent to the > application. > > Combined with Jose's suggestion, this might do the trick for > you.http://msdn.microsoft.com/en-us/library/89211k9b(VS.80).aspx > > > > > > On Tue, Apr 20, 2010 at 2:21 PM, Visar Uruqi wrote: >

[nhusers] Re: How to encrypt the "connection string" in nhibernate.cfg.xml

2010-04-20 Thread Visar Uruqi
Dentler wrote: > Hi Visar, > > You might try putting it in the app.config, then encrypt it and reference it > from your NHibernate configuration using the connection string name > property. > > Thanks, > Jason > > > > > > On Tue, Apr 20, 2010 at 6:37 AM, Vis

[nhusers] How to encrypt the "connection string" in nhibernate.cfg.xml

2010-04-20 Thread Visar Uruqi
Hello I want to deploy an application to several clients, but I can't because, the connection string in nhibernate.cfg.xml is editable, and there is also the password and username of the DB. Is there a way to encrypt it? and decrypt it back in the application? I thought writing an XML file with

[nhusers] Re: How to run T-SQL script or do the database backup in Nhibernate

2010-04-06 Thread Visar Uruqi
e expert's have to say on this issue? Thank you very much for your time Visar On Apr 6, 1:20 pm, Visar Uruqi wrote: > Hello > > I am interested also to know if there is a way with Nhibernate > to backup up your DB, regardless the RDBMS your app sits on. > > I've found

[nhusers] Re: How to run T-SQL script or do the database backup in Nhibernate

2010-04-06 Thread Visar Uruqi
Hello I am interested also to know if there is a way with Nhibernate to backup up your DB, regardless the RDBMS your app sits on. I've found this link in top ten of google search results http://www.jroller.com/ara_e/entry/backup_restore_to_from_xml The guy says that there is an object called "XM

[nhusers] Re: Hilo Step by Step

2010-04-03 Thread Visar Uruqi
E APPLICATION INSTANCE > > / SessionFactory. The first time an id needs to be generated in a session > > factory, a new Hi value is fetched. > > Also, read Tuna's post. If you want to "preserve" all your key space (I > > can't think why. Are 64-bit integers expen

[nhusers] Re: Hilo Step by Step

2010-04-03 Thread Visar Uruqi
columns (32 or 64 bits depending on the usage) > - Adjust the max_lo value to reduce the "wasted" key space when application > instances generate much less values than the default (this applies mostly to > desktop applications) > >    Diego > > > > On Wed

[nhusers] Re: Hilo Step by Step

2010-03-31 Thread Visar Uruqi
it fetches a new Hi value from the DB. > > For the implications of the HiLo behavior, I recommend this post by > Fabio:http://fabiomaulo.blogspot.com/2009/02/nh210-generators-behavior-expl... > >    Diego > > > > On Wed, Mar 31, 2010 at 10:10, Visar Uruqi wrote: > > Hello >

[nhusers] Hilo Step by Step

2010-03-31 Thread Visar Uruqi
Hello Is there a step by step using hilo article? I found out that in order to take advantage of batch commands in nhibernate you have to use hile generator () I looked at Nh Doc and Nh in Action, it does not say much about it, I've came accross this statement: "Generates identifiers that are un

[nhusers] Re: Faster Startup and better performance

2010-03-31 Thread Visar Uruqi
gt; > After BuildSessionFatory all mapping-metadata are compiled to > >>> persisters > >>> > > and you can throw the Configuration with its state. > > >>> > > 2010/3/30 Diego Mijelshon > > >>> > > Fabio answered

[nhusers] Re: Many to Many with lots of properties in the middle table

2010-03-30 Thread Visar Uruqi
fer for many-to-many and when the relation will have > properties then I transform it to an entity > > btw > > > > > > > > > 2010/3/30 Visar Uruqi > > > > > > > Thank you Fabio, this sounds very interesting, do you have any example

[nhusers] Re: Many to Many with lots of properties in the middle table

2010-03-30 Thread Visar Uruqi
Thank you Fabio, this sounds very interesting, do you have any example how to use this map-key-many-to-many a link or something. visar On Mar 30, 3:54 pm, Fabio Maulo wrote: > Map (Dictionary) with map-key-many-to-many and a component > (composite-element) as value. > > 2010/3/30

[nhusers] Re: Many to Many with lots of properties in the middle table

2010-03-30 Thread Visar Uruqi
kim.johans...@industritorget.se > webb:http://www.industritorget.se > > > > -Original Message- > From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of > Visar Uruqi > Sent: den 30 mars 2010 12:40 > To: nhusers > Subject: [nhusers] Many to Many wi

[nhusers] Faster Startup and better performance

2010-03-30 Thread Visar Uruqi
Is it true that if I specify details in the mapping xml file like for example the data-type of the property the length and othe constraints, would result in a faster startup and better performance? (I came to this idea when I enabled the log4net Logging library, and got a bunch of mapping and refl

[nhusers] Many to Many with lots of properties in the middle table

2010-03-30 Thread Visar Uruqi
This is the hardest thing I believe in NHibernate, The many to many relationship when the middle table has properties beside the primary keys. Help me to map this example: Here in this link you will find an image of the schema that I want to map, its 3 tables just for illustration http://treshja.c

[nhusers] Re: how to Lazy Loading the collection after session is closed?

2010-03-26 Thread Visar Uruqi
Thank you very much for these links. : visar On Mar 26, 11:42 am, kor wrote: > this explains how to reattach an object to another > sessionhttp://swik.net/tag4sree/Hibernate+-+Objects/Detached+objects+in+nHib... > > this is a general page about a way to use nhibernate in a desktop > applicat

[nhusers] how to Lazy Loading the collection after session is closed?

2010-03-26 Thread Visar Uruqi
I have a question because I can not resolve it on my own, I've seen the Nhibernate Documentation and the Nhibernate in Action but I can not find it still. The question is on the Lazy Collection, for example I make the lazy property to true (lazy="true") on collection's be it one-to-many or many-to