[nhusers] Re: Delete from List

2010-03-31 Thread Peter Forstmeier
Hi, no idea? Peter -- 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...@googlegroups.com. For more options, visit this

Re: [nhusers] How I can perform this query using HQL or ICriteria

2010-03-31 Thread Dick Negrana
Guys, Anyone can help me??? On Wed, Mar 31, 2010 at 3:55 PM, silentdk wrote: > Guys, > > I need your help... How Can I perform this query using ICriteria or > HQL. I am using Nhibernate 2.0. And How to perform subquery. > > select * from dautotimesetting_idep d where D.BRSHLIFECOUNT in > ((s

[nhusers] Re: Filter on ManyToOne

2010-03-31 Thread thora68
You're' very welcome snickers :-) Actually, EF4 is not an option for us either until we have exhausted all options with NH. Frankly, I suspect EF4 will have serious issues with bi-temp databases as well, but if all else fails we will certainly look into hooking into EF4 at some level to achieve ou

Re: [nhusers] Re: Multiple List of Strings in same table

2010-03-31 Thread Diego Mijelshon
I don't think you can do that directly. You should define a containing element for the IList and have a definition as your value. Diego On Wed, Mar 31, 2010 at 18:45, Eyston wrote: > Yes, I am lucky to just be asking for my own curiosity. I know a way > to do it (table per list). > > I t

[nhusers] Re: Multiple List of Strings in same table

2010-03-31 Thread Eyston
http://stackoverflow.com/questions/1308072/nhibernate-mapping-a-dictionary-of-lists Okay, changing question made it easier to google :) Adding link in case someone else was curious. On Mar 31, 5:45 pm, Eyston wrote: > Yes, I am lucky to just be asking for my own curiosity.  I know a way > to do

[nhusers] Re: Multiple List of Strings in same table

2010-03-31 Thread Eyston
Yes, I am lucky to just be asking for my own curiosity. I know a way to do it (table per list). I think a better question is how would I map the following: IDictionary> ... stumped! ... I'm not even sure that is the right data structure. I would want a Dictionary that can h

Re: [nhusers] Multiple List of Strings in same table

2010-03-31 Thread Diego Mijelshon
If you can define the schema, just avoid the hack and use separate tables. Diego On Wed, Mar 31, 2010 at 17:24, Eyston wrote: > Hello. I have not been using NH awhile and get the joy of using it on > a new project. > > I have worked my domain code and I am starting to work on mapping now >

Re: [nhusers] Re: Hilo Step by Step

2010-03-31 Thread Diego Mijelshon
Read the post carefully. The second formula is how to determine the value to insert as the initial "next_hi" when migrating from identity. You can see exactly how the IDs are generated here: https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate/src/NHibernate/Id/TableHiLoGener

Re: [nhusers] Re: Hilo Step by Step

2010-03-31 Thread Fabio Maulo
2010/3/31 Visar Uruqi > > Is it true that all numbers might get exhausted? > > Yes is true! as with any Int32 or Int64. -- Fabio Maulo -- 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.

[nhusers] Re: Hilo Step by Step

2010-03-31 Thread Visar Uruqi
Thank you very much Diego for your reply. I found the following formulas in this link http://stackoverflow.com/questions/1390078/is-there-a-practical-way-of-migrating-from-identity-columns-to-hilo-keys hilo-id = high-value * max_lo + low-value high-value = ceiling(current-identity / max-lo) Can

[nhusers] Multiple List of Strings in same table

2010-03-31 Thread Eyston
Hello. I have not been using NH awhile and get the joy of using it on a new project. I have worked my domain code and I am starting to work on mapping now to persist it to the db. I have this object: class ProfileAssignments { public virtual IList Groups { get; set;} public virtual ILis

[nhusers] Re: New LINQ Implementation possible feature?

2010-03-31 Thread allan.ritc...@gmail.com
The LINQ query is actually fine. It won't actually run until I iterate through it. I also want to retract this request. I did some further tests and the problem was with the way WCF RIA was doing something, not NHibernate. I should have known better :P On Mar 31, 2:31 pm, José F. Romaniello wr

Re: [nhusers] New LINQ Implementation possible feature?

2010-03-31 Thread José F . Romaniello
I understood you but I think your query is wrong, because you are * delimiting* before sorting. I think this is the apropiate query: NhSession.Query() .Select(x => new MyEntityDTO { ID = x.ID, Something = x.Something.ID }) .OrderBy(dto => dto.Something) .Take(5) .Skip(5) 20

[nhusers] How to update aggregate root from event listener when contained entity is modified?

2010-03-31 Thread Oskar Berggren
Hi, Suppose I have a class Root, which has a property of type Part. Root owns the Part. Now, whenever the Root instance or the Part instance is modified, I want to update the LastModified property of the Root class. The Part itself does not have a LastModified property. I was hoping to be able t

[nhusers] New LINQ Implementation possible feature?

2010-03-31 Thread allan.ritc...@gmail.com
I know the LINQ implementation is not completed yet, so I wanted to check something before I go digging through the code to implement a feature like this NhSession.Query() .Select(x => new MyEntityDTO { ID = x.ID, Something = x.Something.ID }) .Take(5) .Skip(5) .OrderB

Re: [nhusers] Re: ICriteria: select different type then type of criteria

2010-03-31 Thread Robert Rudduck
Select is in the Enumerable Extensions built into .NET (aka Linq). - Robert On Wed, Mar 31, 2010 at 10:58 AM, void* wrote: > Hi Robert, > > thx for your answers. > > I am still a little puzzled: > Can you plz tell me where Select() comes from is this an extension > method? > > Regards, > void*

[nhusers] Re: ICriteria: select different type then type of criteria

2010-03-31 Thread void*
Hi Robert, thx for your answers. I am still a little puzzled: Can you plz tell me where Select() comes from is this an extension method? Regards, void* -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@go

Re: [nhusers] Castle trouble ...

2010-03-31 Thread Krzysztof Koźmic
why are you using old Castle assemblies in new project? 2010/3/31 Paulo Quicoli : > Check you VS project references out > > 2010/3/31 Kris-I >> >> Hello, >> It's not really a trouble NHibernate but I do this : >> This work : >> IWindsorContainer container = new WindsorContainer(); >> This no

Re: [nhusers] Hilo Step by Step

2010-03-31 Thread Diego Mijelshon
There aren't many steps... it's pretty simple... I'll try to address your questions. I did not understood this part "Don’t use this generator with a user- supplied connection". Anybody know what he meant with this? ISessionFactory.OpenSession has overloads that take an IDbConnection. If you us

Re: [nhusers] ICriteria: select different type then type of criteria

2010-03-31 Thread Robert Rudduck
Probably the best way to do it is to do exactly what you are doing, specify an eager fetch for Bar, and then return from the method the right type. So you would get (or something along these lines): ISession session = GetSessionFromSomewhere(); ICriteria criteria = session

Re: [nhusers] ICriteria: select different type then type of criteria

2010-03-31 Thread Robert Rudduck
Actually sorry, I didn't see that there wasn't a reference in the other direction. Let me rethink my answer. - Robert On Wed, Mar 31, 2010 at 8:48 AM, Robert Rudduck wrote: > Reverse the order. You can still have the same join no problem, just > reverse the order of them. > > - Robert > > > On

[nhusers] Re: SQL Server Express 2008

2010-03-31 Thread fknebels
There are a few limitations: § A database cannot exceed 4 gigabytes in size. § SQL Server Express may be installed on a multiple CPU machine, but it will execute (run) only on a single processor or a single processor core if multi-core processors are used. § SQL Server Express may

Re: [nhusers] ICriteria: select different type then type of criteria

2010-03-31 Thread Robert Rudduck
Reverse the order. You can still have the same join no problem, just reverse the order of them. - Robert On Wed, Mar 31, 2010 at 6:25 AM, void* wrote: > Howdy y'all, > > supposed I have a simple scenario like this: > > public class Foo > { >// id and so on omitted > >public virt

Re: [nhusers] Re: SQL Server Express 2008

2010-03-31 Thread Dewang Lakhani
Thanks a lot Diego. Regards, Dewang Lakhani On Wed, Mar 31, 2010 at 9:37 AM, Diego Mijelshon wrote: > Yes, it does. It's used exactly like non-express, so everything you read > about SQL Server 2008 applies to the express edition too. > >Diego > > > On Wed, Mar 31, 2010 at 10:34, Dewang Lakh

Re: [nhusers] Re: SQL Server Express 2008

2010-03-31 Thread Diego Mijelshon
Yes, it does. It's used exactly like non-express, so everything you read about SQL Server 2008 applies to the express edition too. Diego On Wed, Mar 31, 2010 at 10:34, Dewang Lakhani wrote: > Hi, > > I tried a lot for Oracle Lite to wrok with NHibernate, but was > unsuccessful. Please see be

[nhusers] Re: SQL Server Express 2008

2010-03-31 Thread Dewang Lakhani
Hi, I tried a lot for Oracle Lite to wrok with NHibernate, but was unsuccessful. Please see below emails. Hence I was thinking to move to Sql Server Express 2008. Can someone please let me know whether NHibernate 2.1 works with Sql Server Express 2008 or not ? Thanks. Regards, Dewang Lakhani On

[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] Future pattern with fetch on collections

2010-03-31 Thread Kenneth
Hi With this xml: two 2 sql statements are fired, when getting on Class1 (eg. ses.get(1) With this xml: Both queries are joined resulting in a large resultset. Will there be support for "multiple-operations-single-query" ala Future on the above? Eg. I Get(1), which will result i

Re: [nhusers] Will NHibernate 2.1.2 support SQL Server 2008 R2 which is due by may?

2010-03-31 Thread Diego Mijelshon
It is supported already... Diego On Wed, Mar 31, 2010 at 02:46, Alistair wrote: > Will NHibernate 2.1.2 support SQL Server 2008 R2 which is due by may? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email t

Re: [nhusers] Will NHibernate 2.1.2 support SQL Server 2008 R2 which is due by may?

2010-03-31 Thread Oskar Berggren
Have Microsoft made any non-backwards compatible changes? Otherwise, the dialect for mssql 2000, 2005 and 2008 should still work. /Oskar 2010/3/31 Alistair : > Will NHibernate 2.1.2 support SQL Server 2008 R2 which is due by may? > > -- > You received this message because you are subscribed to t

[nhusers] ICriteria: select different type then type of criteria

2010-03-31 Thread void*
Howdy y'all, supposed I have a simple scenario like this: public class Foo { // id and so on omitted public virtual Bar BarRef { get; set; } } public class Bar { // id and so on omitted public virtual string Name { get; set; } }

[nhusers] Will NHibernate 2.1.2 support SQL Server 2008 R2 which is due by may?

2010-03-31 Thread Alistair
Will NHibernate 2.1.2 support SQL Server 2008 R2 which is due by may? -- 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...@go

Re: [nhusers] Re: Faster Startup and better performance

2010-03-31 Thread Gustavo Ringel
In desktop apps i use to do the config during splash screen in a separate thread, in general i have 4/5 seconds until the user which just did double click ends writing his username and password, so i'm always faster than that... Gustavo. On Wed, Mar 31, 2010 at 1:27 PM, Visar Uruqi wrote: > I t

[nhusers] Re: Faster Startup and better performance

2010-03-31 Thread Visar Uruqi
I tried the serialization and deserialization and WOW it has shorten the startup a lot, By the way I'm developing a desktop application that's why the startup thing matters to me. How do you guys measure the duration of these operations in seconds and miliseconds, I'm curios to know, do you use an

[nhusers] Castle trouble ...

2010-03-31 Thread Kris-I
Hello, It's not really a trouble NHibernate but I do this : This work : IWindsorContainer container = new WindsorContainer(); This not work : IWindsorContainer container = new WindsorContainer(); container = new WindsorContainer().Install(Configuration.FromXmlFile("Configs/Windsor.config")); com

[nhusers] How I can perform this query using HQL or ICriteria

2010-03-31 Thread silentdk
Guys, I need your help... How Can I perform this query using ICriteria or HQL. I am using Nhibernate 2.0. And How to perform subquery. select * from dautotimesetting_idep d where D.BRSHLIFECOUNT in ((select max(D.BRSHLIFECOUNT) from dautotimesetting_idep d), (select max(D.BRSHLIFECOUNT) - 1 from