[nhusers] So long, and thanks for all the fish

2014-02-24 Thread Pete Appleton
d appreciated. Thank you again to everyone, and best wishes for your respective futures. Regards, Pete Appleton -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an

RE: [nhusers] Proxy m -> 1 assignment and lazy loading

2014-02-21 Thread Pete Appleton
arentType Parent { // Denormalised for performance… set { _parent = value; this.Owner = _parent.Owner; } /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com]

RE: [nhusers] Re: Entity mappings: Domain assembly, or separate?

2014-02-20 Thread Pete Appleton
en us any concrete benefits in practice. Has anyone had an occasion where the mapping location has had a real effect (for good or bad)? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Guilherme Paschoal Sent: 19 February 2014 17:42 To: nhusers@googlegrou

[nhusers] Entity mappings: Domain assembly, or separate?

2014-02-19 Thread Pete Appleton
(although we're a web-based solution, so the external API is REST/JSON-based anyway and this doesn't impact consumers). What are other peoples thoughts on this please? Has anyone else got an elegant solution to this? Thanks, /Pete -- You received this message because you are subscribe

RE: [nhusers] Re: Using NHibernate with MVC 3 and WCF

2014-01-24 Thread Pete Appleton
your setup e.g. whether you're using the 'session-per-request' pattern or something else, are you using DI, what's the ASP.NET session used for, etc… /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Ian Harden Sent: 23 January 201

RE: [nhusers] Re: Using NHibernate with MVC 3 and WCF

2014-01-22 Thread Pete Appleton
It's impossible to give any advice without knowing what the issue is! In what way does the site "hang"? What makes you suspect that it's NHibernate related? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Ian Harden Sent: 22 J

RE: [nhusers] Adding a new item to a collection using Fluent NHibernate doesn't INSERT the new row in the DB

2014-01-21 Thread Pete Appleton
ed set; } ShoppingListLine(ShoppingList list) { this.List = list; this.List.Items.Add(this); } void Delete() { if(this.List != null) this.List.Items.Remove(this); this.List = null; } } var dbList = ; var newItem = new ShoppingListLine(dbList); // ctor handles asso

RE: [nhusers] Suggestions on implementing entity level security

2014-01-09 Thread Pete Appleton
ut this is that it's completely transparent to everything other than (1) the mappings and (2) the session creation, as well as being extremely simple to use. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Patrick Doran Sent: 08 January 2014 22

RE: [nhusers] Should I add an extra surrogate key to this table?

2013-12-16 Thread Pete Appleton
mmutable then I'd mark them as 'protected set' and add a parameter to the public constructor to assign them, e.g. protected UserTagBookmark() {} // NH calls this when reading the entity public UserTagBookmark(User owner) { ... } // Your code calls this to create a new instance that&

RE: [nhusers] NHibernate Criteria Filtering

2013-12-05 Thread Pete Appleton
o Restriction is added to criteriaQuery so therefore it will return "everything" when executed. Does the 2nd if statement need an 'else' clause? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Heidel Sent: 05 December 2013 13:28 T

RE: [nhusers] Re: Mark entity as Clean despite modifying it's property?

2013-11-14 Thread Pete Appleton
for this entity and returns an empty array if it's 'logically clean' for your scenario? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Sid Shetye Sent: 14 November 2013 02:13 To: nhusers@googlegroups.com Subject: [nhusers] Re: Mark entity as Cle

RE: [nhusers] POCO associated with dynamic-map entity

2013-11-05 Thread Pete Appleton
Thanks, that's worked nicely :) /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Gunnar Liljas Sent: 05 November 2013 17:30 To: nhusers@googlegroups.com Subject: Re: [nhusers] POCO associated with dynamic-map entity If you turn ADictionary i

[nhusers] POCO associated with dynamic-map entity

2013-11-05 Thread Pete Appleton
Is it possible to have just one entity in a session operating as a dynamic-map, all other entities being mapped as POCO's? For example: ... ... http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/groups/opt_out.

RE: [nhusers] Creating a proxy instance failed with REGDB_E_CLASSNOTREG

2013-10-25 Thread Pete Appleton
The GP setting worked for us in the production environment too - no problems since applying it. I'd be interested to know if it's the solution for you too. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Kenny Eliasson Sent: 24 October 201

RE: [nhusers] Design pattern - where to put business logic

2013-09-30 Thread Pete Appleton
gt; bytes-in-RAM (domain entity) or different-bytes-in-different-RAM (some other process, possibly on a different machine using a different language and even a different CPU instruction set). CORBA was the closest anyone came to achieving the OO dream, and we all know how well that worked out!!

RE: [nhusers] Re: http://nhforge.org/ down?

2013-09-17 Thread Pete Appleton
+1 From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of guilemsola Sent: 17 September 2013 08:16 To: nhusers@googlegroups.com Subject: [nhusers] Re: http://nhforge.org/ down? IMHO those kind of things cause a bit of bad image for the NH project. Also search engines

RE: [nhusers] http://nhforge.org/ down?

2013-09-04 Thread Pete Appleton
Looks like the DNS record's expired: administrator@charon ~ % dig nhforge.org ; <<>> DiG 9.9.2-P2 <<>> nhforge.org ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 64064 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1 ;

RE: [nhusers] converting a mapping from xml to mapping by code

2013-08-14 Thread Pete Appleton
mapping from xml to mapping by code Hi Pete, Worked a treat! Thanks. Sean. From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Pete Appleton Sent: 13 August 2013 13:53 To: nhusers@googlegroups.com Subject: RE: [nhusers] converting a mapping from xml to mapping by

RE: [nhusers] converting a mapping from xml to mapping by code

2013-08-13 Thread Pete Appleton
t; epd.Forename, m => m.NotNullable(true)); } } /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Sean Farrow Sent: 13 August 2013 12:07 To: 'nhusers@googlegroups.com' Subject: [nhusers] converting a mapping from xml to mapping by

RE: [nhusers] Minimizing NHibernate redistribution

2013-08-07 Thread Pete Appleton
on is to give people freedom to use the software as long as they're not trying to restrict other people's freedom. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Niv Ingberg Sent: 07 August 2013 06:28 To: nhusers@googlegroups.com Subject: Re: [

RE: [nhusers] Minimizing NHibernate redistribution

2013-08-06 Thread Pete Appleton
believe that that's entirely optional. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Niv Ingberg Sent: 06 August 2013 07:41 To: nhusers@googlegroups.com Subject: [nhusers] Minimizing NHibernate redistribution Hi, We have a commercial product

RE: [nhusers] Save a Child for a existent Parent

2013-07-18 Thread Pete Appleton
Effectively then, you're trying to change the type of an existing object. I don't know of way of doing that in NHibernate (nor in C# !). See http://stackoverflow.com/questions/478296/nhibernate-changing-sub-types for a maybe useful discussion. /Pete From: nhusers@google

RE: [nhusers] Save a Child for a existent Parent

2013-07-18 Thread Pete Appleton
Is that a Parent : Child relationship, or are you changing the type of an existing entity - do you expect to have two rows with the same Id ? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Felipe Oriani Sent: 18 July 2013 16:26 To: nhusers

RE: [nhusers] Modify the collections of an entity "collection was modified" exception

2013-07-09 Thread Pete Appleton
(entity == null) context.Fail(...); return context.Map(model, entity); // Entire object graph gets synced here }) /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Matteo Migliore Sent: 09 July 2013 14:25 To: nhusers@googlegroups.com Subject: Re: [nhusers] Modify

RE: [nhusers] Modify the collections of an entity "collection was modified" exception

2013-07-05 Thread Pete Appleton
estion for you is to carefully work through the exception stack trace to find out which collection is the problem; once you've found that, then use the ToList() / ToArray() technique. NB, you may find it helpful to untick the 'Just my code' option in the VS debugger options. /Pete -

RE: [nhusers] Modify the collections of an entity "collection was modified" exception

2013-07-04 Thread Pete Appleton
; as soon as something's removed from it, you'll get exception you described. This is not related to NHibernate, it's a standard 'feature' of .NET :). /Pete -Original Message- From: nhusers@googlegroups.com on behalf of Matteo Migliore Sent: Thu 7/4/2013 11:58 AM To: nhuse

RE: [nhusers] about convert enum to string nhibernate 3.3.3

2013-07-01 Thread Pete Appleton
nager / something else handling this? If not, I'd _strongly_ advise you to consider this. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of arthurtu...@gmail.com Sent: 28 June 2013 22:04 To: nhusers@googlegroups.com Subject: [nhusers] about convert enum to st

RE: [nhusers] Using 100 tables o more with NHibernate

2013-06-19 Thread Pete Appleton
se cleanly? My comment about the sweetness of pvginkel's approach was specific to his/her situation [where tables and columns have completely different names from the C#], definitely not something I'd use as a standard technique. /Pete From: nhusers@googlegroups.com [mailto:nhus

RE: [nhusers] Using 100 tables o more with NHibernate

2013-06-19 Thread Pete Appleton
That sounds really sweet, especially being able to generate the migration DDL on the fly. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of pvginkel Sent: 19 June 2013 06:03 To: nhusers@googlegroups.com Subject: Re: [nhusers] Using 100 tables o more with

RE: [nhusers] Exception when mapping by code internal properties.

2013-06-19 Thread Pete Appleton
access the internal members. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Michael Logutov Sent: 14 June 2013 07:57 To: nhusers@googlegroups.com Subject: [nhusers] Exception when mapping by code internal properties. I have this simple class:

RE: [nhusers] Cascading fetch

2013-06-12 Thread Pete Appleton
nts).Future(); var blogsWithPostsAndComments = postFuture.ToList(); // Executes both Future queries above in one batch We succesfully use this technique quite a lot with large graphs to avoid the issues you're describing. HTH, /Pete From: nhusers@

RE: [nhusers] Bootstrapping with multiple Session Factories

2013-05-29 Thread Pete Appleton
.Select(group => group.First()); That should remove the need for any mutices *except* the final addition to factoryMap (in case you happen to get a hash-code clash - bad things would happen if this weren't serialised) /Pete From: nhusers@googlegroups.co

RE: [nhusers] query to select orphans item

2013-05-21 Thread Pete Appleton
on to the DB - you might want to consider using a bidirectional mapping /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of kor Sent: 21 May 2013 10:14 To: nhusers@googlegroups.com Subject: [nhusers] query to select orphans item hi, i have a "parent&q

RE: [nhusers] clearing a table using NHibernate

2013-05-16 Thread Pete Appleton
HQL, I'm afraid - session.CreateQuery("delete from Entity").ExecuteUpdate(); /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Sean Farrow Sent: 16 May 2013 06:48 To: 'nhusers@googlegroups.com' Subject: [nhusers] clearing

RE: [nhusers] Nhibernate SqlDelete(stored procedure) generates error. Set Expectation on SqlDelete

2013-05-16 Thread Pete Appleton
= new NHibernate.Cfg.Configuration(); config.AddDeserializedMapping(byCodeMappings, null); IEnumerable customXmlMappings = FindTypesImplementingCustomXmlMappingInterface(); foreach (var t in customXmlMappings) { config.AddXmlString(((CustomXmlMappingInterface)Activator.CreateInstance (

RE: [nhusers] Mapping questions

2013-05-13 Thread Pete Appleton
IClassMetadata mapping = ISessionFactory.GetClassMetadata(typeof(T)); // null if no mapping... string nameProperty = mapping.IdentifierPropertyName; /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Sean Farrow Sent: 13 May 2013 12:52 To: 'nh

RE: [nhusers] Re: IPostInsertEventListener : Insert executed multiple times

2013-05-10 Thread Pete Appleton
ser t-not-working /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of sebi Sent: 10 May 2013 08:14 To: nhusers@googlegroups.com Subject: [nhusers] Re: IPostInsertEventListener : Insert executed multiple times Unfortunately, I have to revise my last stat

RE: [nhusers] Making properties when mapping by code

2013-05-09 Thread Pete Appleton
Property(x => x.EmailAddress, m => { m.Length(100); m.NotNullable(false); }); From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Sean Farrow Sent:

RE: [nhusers] Re: Determine the existence of an entity meeting a condition

2013-05-02 Thread Pete Appleton
d of just creating a SQL query 'on-the-fly'. Appreciated, /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Ricardo Peres Sent: 02 May 2013 16:53 To: nhusers@googlegroups.com Subject: Re: [nhusers] Re: Determine the existence of an entity meeti

RE: [nhusers] Re: Determine the existence of an entity meeting a condition

2013-05-02 Thread Pete Appleton
1 Those last two lines (italicized) are what I want to avoid; I'm literally after a single, scalar result of '1' if any row(s) match my condition or '0' if none do. Sort of like bool isMyConditionMet = session.QueryOver().Select(SqlProjection("

RE: [nhusers] Re: Determine the existence of an entity meeting a condition

2013-05-02 Thread Pete Appleton
.Constant(1), Projections.Constant(2)) Thanks for the suggestion :) /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Ricardo Peres Sent: 02 May 2013 10:40 To: nhusers@googlegroups.com Subject: [nhusers] Re: Determine the existence of an entity meeting a condition

[nhusers] Determine the existence of an entity meeting a condition

2013-05-02 Thread Pete Appleton
rate the outer query though, which doesn't have a 'from' statement? Thanks, /Pete -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+

RE: [nhusers] Re: OUTPUT parameters in stored procedure.

2013-04-29 Thread Pete Appleton
The bit I'm struggling to understand is why you need to use a stored procedure for the insert operation - is there a lot of logic in this procedure that's hard to handle elsewhere? If that isn't the case then I think that your initial requirement (population of the CreateDate column by the DB s

RE: [nhusers] NHibernate and Criteria or NPersistence with other Query

2013-04-26 Thread Pete Appleton
I'm not familiar with NPersistence - NHibernate supports XML and a Criteria API which superficially looks similar to JPA, see http://nhforge.org/doc/nh/en/index.html#querycriteria /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Jose Antonio Lopez

RE: [nhusers] NHibernate architecture in a clas library

2013-04-26 Thread Pete Appleton
oglegroups.com Subject: RE: [nhusers] NHibernate architecture in a clas library Hi Pete, Thank for this-it makes sense. Two follow-up questions, I'm assuming you don't use a shared session across unit of work instances? Secondly where do you build your session factory? I'm t

RE: [nhusers] NHibernate architecture in a clas library

2013-04-26 Thread Pete Appleton
return UoW.DoWork(session -> { }); catch { } } } I emphasise that this is just something I've come up with and am happy with, I'm sure that there are many other approaches with equal or better merit! /Pete From: nhusers@googlegroups.com [mailto:nhusers@googleg

RE: [nhusers] Re: Wrong Mapping

2013-04-25 Thread Pete Appleton
Everything there is fine, but whatever DB is being accessed doesn't have the right schema. Please paste your DB config, make sure your factory is accessing the DB in which you created the tables. -Original Message- From: nhusers@googlegroups.com on behalf of Peter Forstmeier Sent: Thu 4

RE: [nhusers] Re: OUTPUT parameters in stored procedure.

2013-04-24 Thread Pete Appleton
7;OUT' parameters seems like an awful lot of work for what looks like a very simple/standard requirement on the surface. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of sash.kr@gmail.com Sent: 24 April 2013 15:28 To: nhusers@googlegroups.com Subject

RE: [nhusers] SubClass Mapping in NHibernate by using same table

2013-04-24 Thread Pete Appleton
There's no Discriminator (column and value) mapped From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Jugal Panchal Sent: 24 April 2013 13:19 To: nhusers@googlegroups.com Subject: [nhusers] SubClass Mapping in NHibernate by using same table I have one table. That

RE: [nhusers] Efficiently loading a large object graph in a multi-threaded winforms application.

2013-04-23 Thread Pete Appleton
omebody who had achieved a significant speedup in entity instantiation when using the LINQ API, I don't know if it's applicable to your selection nor do I remember the details I'm afraid, but it could be worth googling for... <https://lh5.googleusercontent.com/-ht14vjZlGEg/UXaNOjNgj

RE: [nhusers] Efficiently loading a large object graph in a multi-threaded winforms application.

2013-04-23 Thread Pete Appleton
aded with exactly one SQL batch? I recollect seeing a post from somebody who had achieved a significant speedup in entity instantiation when using the LINQ API, I don't know if it's applicable to your selection nor do I remember the details I'm afraid, but it could be worth goo

RE: [nhusers] Efficiently loading a large object graph in a multi-threaded winforms application.

2013-04-23 Thread Pete Appleton
I recollect seeing a post from somebody who had achieved a significant speedup in entity instantiation when using the LINQ API, I don't know if it's applicable to your selection nor do I remember the details I'm afraid, but it could be worth googling for... /Pe

RE: [nhusers] Trouble logging userid when using Nhibernate Envers

2013-04-23 Thread Pete Appleton
Your revision entity doesn't have a [RevisionNumber] and/or [RevisionTimestamp] attribute - my suggestion is below, but I don't guarantee that it's correct: - Inherit CustomRevisionEntity from DefaultRevisionEntity - Remove everything except the custom property(s) you're adding e.g. UserIdenti

RE: [nhusers] OUTPUT parameters in stored procedure.

2013-04-23 Thread Pete Appleton
I think it's very easy to implement. I'm sure the developers would appreciate a patch :) From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of sash.kr@gmail.com Sent: 22 April 2013 20:09 To: nhusers@googlegroups.com Subject: [nhusers] OUTPUT parameters in stored

RE: [nhusers] Wrong Mapping

2013-04-22 Thread Pete Appleton
ess a many-to-one to Employee and then mapping it as Inverse which would allow NHibernate to avoid the update statement; without the many-to-one, though, it is correct to omit Inverse. /Pete -Original Message- From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Be

RE: [nhusers] If entity exists that is safe across different processes.

2013-04-22 Thread Pete Appleton
I'm not sure what relevance the multi-threaded aspect of the application is - from the reference to locking, I'm wondering if you've got a problem with session handling which is complicating the real logic? >From what I understand, I think the following would probably do what you want using the

RE: [nhusers] Mapping SaveUpdate Reference (HasOne)

2013-04-09 Thread Pete Appleton
session.Get() - Load() just returns a proxy which then gets lazily initialised /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Felipe Oriani Sent: 09 April 2013 03:23 To: nhusers@googlegroups.com Subject: Re: [nhusers] Mapping SaveUpdate Reference

RE: [nhusers] NHibernate connection.isolation settings is not used while establishing a connection to the database

2013-04-08 Thread Pete Appleton
r handling in this code is suspect, I think that the error collection belongs with the UnitOfWork but that is a currently unresolved issue. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Paulson Mathew Sent: 08 April 2013 12:43 To: nhusers@googleg

RE: [nhusers] Mapping localization tables in Nhibernate

2013-04-08 Thread Pete Appleton
gestion would be to access that via the the Country association rather than exposing it directly. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Patrick Sannes Sent: 06 April 2013 13:25 To: nhusers@googlegroups.com Subject: [nhusers] Mapping localiza

RE: [nhusers] NHibernate connection.isolation settings is not used while establishing a connection to the database

2013-04-05 Thread Pete Appleton
That feels very kludgy to me though. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Paulson Mathew Sent: 05 April 2013 06:15 To: nhusers@googlegroups.com Subject: [nhusers] NHibernate connection.isolation settings is not used while establishing a connecti

RE: [nhusers] Common Language Runtime detected an invalid program when using lazy properties

2013-04-03 Thread Pete Appleton
er, NHibernate.Caches.SysCache false true 3600 web On Wednesday, April 3, 2013 7:49:19 PM UTC+11, PeteA wrote: Please provide more information, including at a minimum (1) the full stack trace for the exception and (2) the NHibernate configura

RE: [nhusers] Common Language Runtime detected an invalid program when using lazy properties

2013-04-03 Thread Pete Appleton
Please provide more information, including at a minimum (1) the full stack trace for the exception and (2) the NHibernate configuration (not mappings) /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of jason.hill Sent: 03 April 2013 08:12 To: nhusers

RE: [nhusers] QueryOver alias Implicitly Captured Closure

2013-04-02 Thread Pete Appleton
I think that's inherent with the QueryOver syntax, though it's harmless. http://stackoverflow.com/questions/13633617/why-does-resharper-tell-me-i mplicitly-captured-closure-end-start might be of interest. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On

RE: [nhusers] Lazy-load or batching of index-many-to-many keys? 18193

2013-04-02 Thread Pete Appleton
If you know that you're going to iterate over the Areas then I'd suggest eagerly loading them - what's your reasoning for not wanting to do that? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Trinition Sent: 01 April 2013 21

RE: [nhusers] Join between Different Database Management Systems

2013-03-18 Thread Pete Appleton
RDBMS-wise] relationship - if that's the case then it's fairly easy to maintain an ISessionFactory for each database though and do the cross-database work in memory. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Atilla Ilhan KARTAL Sent: 18

RE: [nhusers] Re: [nhibernate-development] NHibernate 3.3.3.GA released

2013-03-18 Thread Pete Appleton
I'd be interested in helping out with the nhforge site /Pete -Original Message- From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of John Davidson Sent: 17 March 2013 23:05 To: nhibernate-developm...@googlegroups.com Cc: nhusers@googlegroups.com Subject: [nh

RE: [nhusers] Mapping property of BaseClass type

2013-03-13 Thread Pete Appleton
ted in either class-bloat, casts or a-priori knowledge of concrete Animal types. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Fran Knebels Sent: 13 March 2013 16:12 To: nhusers@googlegroups.com Subject: Re: [nhusers] Mapping property of BaseClass

RE: [nhusers] Re: NHibernate + Intersystems Caché OODBMS Connection Issues

2013-03-07 Thread Pete Appleton
see http://nhforge.org/doc/nh/en/index.html#persistent-classes-poco-identifier . /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Tay Sent: 07 March 2013 16:33 To: nhusers@googlegroups.com Subject: [nhusers] Re: NHibernate + Intersystems Caché OODBMS

RE: [nhusers] NHibernate + Intersystems Caché OODBMS Connection Issues

2013-03-07 Thread Pete Appleton
The query hasn't been told what type of object to return - try query.AddEntity(typeof(MacSys_Envmnt_Data_SalesRepRegn)); before calling List() /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Tay Sent: 07 March 2013 15:42 To: nh

RE: [nhusers] Re: System.IndexOutOfRangeException: Unable to find specified column in result set

2013-03-06 Thread Pete Appleton
pings and your posts that give me this suspicion, in particular the mixing of the Account class (domain entity?) with the GetPLCAndNSPLC class (DTO?); the fact that Account.SetOfPLCAndNSPLC is null; and a general lack of coherency about the mappings). You may well find that you don

RE: [nhusers] Re: System.IndexOutOfRangeException: Unable to find specified column in result set

2013-03-05 Thread Pete Appleton
}, s.UIDACCOUNT as {rec.Account} /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Fan Yang Sent: 05 March 2013 13:47 To: nhusers@googlegroups.com Subject: [nhusers] Re: System.IndexOutOfRangeException: Unable to find specified column in result set

RE: [nhusers] System.IndexOutOfRangeException: Unable to find specified column in result set

2013-03-05 Thread Pete Appleton
The first thing that strikes me is that the SQL query isn't returning all of the properties declared in the entity mapping (I don't see "Id" or "Account") /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Fan Yang Sent: 0

RE: [nhusers] Controlling cascade order

2013-02-28 Thread Pete Appleton
rom the current methodology? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Pete Appleton Sent: 26 February 2013 13:42 To: nhusers@googlegroups.com Subject: [nhusers] Controlling cascade order Firstly, my apologies for the HTML mail with a picture - I hope thi

[nhusers] Controlling cascade order

2013-02-26 Thread Pete Appleton
he top-level entities depend upon them. How can we ensure that this happens please? Thanks in advance, /Pete -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, sen

[nhusers] Feature suggestion

2013-02-18 Thread Pete Appleton
d as well. At the moment, I think I can either use HQL or do a list-then-delete which is a very sucky operation IMO - if I've missed something please let me know! Thoughts? /Pete -- You received this message because you are subscribed to the Google Groups "nhusers" group.

RE: [nhusers] Mapping a Collection of Strings By Code

2013-02-06 Thread Pete Appleton
e => { e.Column("Permission"); e.Type>(); }) ); /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Ricardo Peres Sent: 06 February 2013 12:32 To: nhusers@googlegroups.com Subject: [nhusers] Map

RE: [nhusers] Re: Performance of NH 3.3.1 vs EF 5.0

2013-01-31 Thread Pete Appleton
4.5 171% slower * NHibernate 3.3.1 163% slower Are those figures really correct - for example, "EF5 + Model First + .NET 4.5" takes just over twice the duration of baseline? Or do you mean that duration(test)/duration(baseline) == 100.8%, i.e. its ~0.8% slower?? /Pete Fro

RE: [nhusers] NHibernate pure one-to-one mapping

2013-01-30 Thread Pete Appleton
You seem to have "constrained" at both ends of the relationships, it should only be on the dependent entity (Employee and BankAccount) Current: (user) (employee) Try dropping the 'constrained' attribute from the 's in User /Pete From: nhusers@googleg

RE: [nhusers] LINQ vs QueryOver?

2013-01-28 Thread Pete Appleton
yOver, I know that I'm formulating an RPC call that cannot be anything else. Then again, I have very mixed feelings about lazy initialisation vs. getting the correct object graph for your operation in one go. Pete -Original Message- From: nhusers@googlegroups.com [mailto:nhusers@

[nhusers] LINQ vs QueryOver?

2013-01-23 Thread Pete Appleton
choice of QueryOver is motivated by (1) avoiding the 'magic strings' in HQL (or SQL!), and (2) making a clear-cut distinction between DB access (QueryOver) vs in-memory operations (LINQ extensions). What do other people prefer, and why? Cheers, Pete -- You received this message because y

RE: [nhusers] Lazy loading lazy=extra no session or session was cosed

2012-12-17 Thread Pete Appleton
Could you paste some (minimal) code illustrating the problem please? /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of hoghweed Sent: 17 December 2012 09:54 To: nhusers@googlegroups.com Subject: [nhusers] Lazy loading lazy=extra no session or session was

RE: [nhusers] Composite Key cascade issue

2012-12-14 Thread Pete Appleton
Try using a in RoleSecurityItemPermission's composite ID instead of a ; I didn't see anything in the mapping to let NHibernate know that the composite ID is related to the associated Role & SecurityItem /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.

RE: [nhusers] Creating a proxy instance failed with REGDB_E_CLASSNOTREG

2012-12-13 Thread Pete Appleton
- see http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-ser ver-application-may-stop-working-on-windows-server-2008.aspx. This solution was found without the use of goats. <http://www.staff.uni-mainz.de/neuffer/scsi/fun.html> /Pete -Original Message- From: nhuse

[nhusers] Creating a proxy instance failed with REGDB_E_CLASSNOTREG

2012-12-13 Thread Pete Appleton
etely unusable Thanks, Pete 2012-12-13 05:09:59,543 [7]: ERROR NHibernate.Proxy.DefaultProxyFactory - Creating a proxy instance failed System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

RE: [nhusers] NHibernate Query using QueryOver with Left Outer Joins and Where Clauses

2012-12-11 Thread Pete Appleton
e(x => x.Id == groupId) .Select(x => x.UserId); var userQuery = NhSession.QueryOver() .WithSubquery.WhereProperty(x => x.Id) .NotIn(membershipQuery); var users = userQuery.List(); /Pete From: nhusers@googlegroups.com

RE: [nhusers] System.NotSupportedException: Boolean Equals(Int32, Int32)

2012-12-06 Thread Pete Appleton
PS - you probably want to make sure that you commit your transaction ;). In your original code it's not committed, so it'll be rolled-back when it's disposed of by the using block From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Pete Appleton Sent: 0

RE: [nhusers] System.NotSupportedException: Boolean Equals(Int32, Int32)

2012-12-06 Thread Pete Appleton
How about (omitting transaction handling etc) public TEntity Get(TId id) { return session.Get(id); } ?? From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Luiz Angelo Heinzen Sent: 06 December 2012 13:07 To: nhusers@googlegroups.com Subject:

RE: [nhusers] Re: SQL Server Identity and Nhibernate.... what is the latest story?

2012-11-29 Thread Pete Appleton
e "approved" manner - which is not what happens with most of them). I'd prefer some form of namespacing construct (think SNMP OID's, or DNS if you're not old enough) for things which _must_ be unique, but in the real world GUID's are the best we've got so I

RE: [nhusers] Re: How to save new entities with generated Guid without requiring a select from NH

2012-11-27 Thread Pete Appleton
(http://nhforge.org/doc/nh/en/index.html#components-compositeid) plus a version to allow transience detection. /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of costa Sent: 26 November 2012 20:56 To: nhusers@googlegroups.com Subject: Re: [nhusers] Re: How

RE: [nhusers] Re: How to save new entities with generated Guid without requiring a select from NH

2012-11-26 Thread Pete Appleton
rn tends to be: TChild: Parent {get;protected set;} Index { get { return Parent.Children.IndexOf(this); } } Child(Parent parent) { if(parent == null) throw; } /Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of costa Sent: 23 November 2012 19

RE: [nhusers] RE: Envers - custom IIdMapper implementation?

2012-11-20 Thread Pete Appleton
s of the system retrieve anything other than complete graphs from the DB) which feels like a bug waiting to be triggered Thanks for the assistance, Pete -Original Message- From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Roger Kratz Sent: 20 November 2012 15:

[nhusers] RE: Envers - custom IIdMapper implementation?

2012-11-20 Thread Pete Appleton
bject: [nhusers] RE: Envers - custom IIdMapper implementation? I don't think it's currently possible. Why do you want to do this? What do you want to accomplish? -Original Message- From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Pete Appleton Sent

RE: [nhusers] RE: Envers - custom IIdMapper implementation?

2012-11-20 Thread Pete Appleton
IIdMapper implementation? I don't think it's currently possible. Why do you want to do this? What do you want to accomplish? -Original Message- From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Pete Appleton Sent: den 20 november 2012 13:08 To: nhusers@g

[nhusers] Envers - custom IIdMapper implementation?

2012-11-20 Thread Pete Appleton
Hi, We're wanting to use a custom IIdMapper in our Envers setup, but haven't found the extension point to configure it; any pointers please? Thanks, Pete -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, s

RE: [nhusers] RE: Antlr.Runtime.MismatchedTokenException from Envers with generic entities

2012-11-14 Thread Pete Appleton
s] RE: Antlr.Runtime.MismatchedTokenException from Envers with generic entities Probably a bug in Envers. Can you please JIRA this with a (minimal) failing test? -Original Message- From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Pete Appleton Sent: den 14 november 2012 17:13 To: nh

[nhusers] Antlr.Runtime.MismatchedTokenException from Envers with generic entities

2012-11-14 Thread Pete Appleton
L "select ee__ from Foretel.SurveySystem.Domain.PageQuestion`1[[Foretel.SurveySystem.Domain. TextQuestion, Foretel.SurveySystem.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]_Aud ee__ where ee__.originalId.Id = :_p0 and ee__.EndRev is null" Any help appreciated! Thanks, Pete -- You rec

[nhusers] Specifying inter-assembly dependencies with conformist ByCode mapping?

2012-11-13 Thread Pete Appleton
erClassMapping: ClassMapping MappingAssemblyB.SubClass1Mapping: SubclassMapping <--- fails if added before SubClass2Mapping MappingAssemblyC.SubClass2Mapping: SubclassMapping Thanks, Pete -- You received this message because you are subscribed to the Google Groups "nhusers" group. To pos

[nhusers] Re: DistinctRootEntityResultTransformer not available in NHibernate Linq

2012-10-23 Thread pete
en accessing list locales the number of entries is the rowcount of all articles. Maybe there is a problem that both properties are named "Locales". Otherwise it seems that NHibernate.Linq.ResultTransformer has to be patched ... Am Dienstag, 23. Oktober 2012 00:11:55 UTC+2 schrieb pete:

[nhusers] DistinctRootEntityResultTransformer not available in NHibernate Linq

2012-10-22 Thread pete
I have the same problem as a user describes here: http://groups.google.com/group/nhusers/browse_thread/thread/6a4c233931dc5eea I just upgraded to NH 3.2.0GA where previously I was using NH2.2.4 with Linq addin. One feature I had in my old repository was SetResultTransformer(new DistinctRootEnt

RE: [nhusers] Join between tables and result to another class

2012-09-28 Thread Pete Appleton
Take a look at http://nhforge.org/doc/nh/en/index.html#queryqueryover-projections, in particular the AliasToBean transformer is probably what you're after. Pete From: nhusers@googlegroups.com [mailto:nhusers@googlegroups.com] On Behalf Of Christian I. Sent: 27 September 2012 21:

  1   2   >