[nhusers] Re: WPF and INotifyPropertyChanged

2009-10-19 Thread Miguel
I thought this is not necessarily an NHibernate problem, but related to this issue. In WPF or Silverlight, we need to implement those interfaces, this dynamic proxy generation works great and we have the right hooks in NHibernate to do it, but Do you know how to do something similar if we need

[nhusers] Re: NHValidator Not-Null does not validate

2009-10-19 Thread Fernando Sosa Balaguer
OK, i wrote it a little confusing. Sorry. If I set a null value to a property with NHV not-null constraint, and try to save the object, a PropertyValueException[not-null property references a null or transient value] is thrown instead of InvalidStateException. On Oct 15, 12:42 pm, Fabio Maulo

[nhusers] Re: WPF and INotifyPropertyChanged

2009-10-19 Thread José F . Romaniello
You should use WCF extensions point in that secenario rather than Nhibernate extensions point. You could use dynamicproxy in the desserialization proccess. Have a look to IDataContractSurrogate. GetDesearilizedObject method. BTW, Castle DP is compatible with silverlight 2009/10/19 Miguel

[nhusers] Re: WPF and INotifyPropertyChanged

2009-10-19 Thread LasseL
Too much Invarsion I am a real newbee to this,,, but eager to learn. Can you explain more?? On 18 Okt, 22:11, Fabio Maulo fabioma...@gmail.com wrote: Too much invasion. 2009/10/18 LasseL lg.lindst...@gmail.com Another thing raised to my mind.. regarding configuration of

[nhusers] Re: Transaction not rolling back - who's bug is this?

2009-10-19 Thread webpaul
Not sure if this is the recommended way, but I set autoflush to never and manually call both flush and commit (though I have my base repository commit call flush automatically) that way I know exactly when these things happen. After reading ayende's article I realized that is how I have been

[nhusers] Re: DTO's New to NH

2009-10-19 Thread YankeeImperialistDog
Thanks for the reply, Your advise is appreciated and i'm going to agree with you. My question now is what stratagy would you recomend for DTO that minimizes coding and can make use of existing entities, but not break sepration? I'm really trying to organize, simplify, and standardize my projects

[nhusers] Re: NHValidator Not-Null does not validate

2009-10-19 Thread Fabio Maulo
You are integrating NHV with NH and in the Save/Update NH is working before NHV. 2009/10/19 Fernando Sosa Balaguer fernandososa...@gmail.com OK, i wrote it a little confusing. Sorry. If I set a null value to a property with NHV not-null constraint, and try to save the object, a

[nhusers] Re: WPF and INotifyPropertyChanged

2009-10-19 Thread Fabio Maulo
The rule for a good framework is : DON'T TOUCH MY CODE!!!The framework should work without need to change your existing code. 2009/10/19 LasseL lg.lindst...@gmail.com Too much Invarsion I am a real newbee to this,,, but eager to learn. Can you explain more?? On 18 Okt, 22:11, Fabio Maulo

[nhusers] Re: DTO's New to NH

2009-10-19 Thread YankeeImperialistDog
What about this? http://ayende.com/Blog/archive/2007/12/05/Object--Object-mapping.aspx On Oct 19, 8:57 am, YankeeImperialistDog webbuilder...@gmail.com wrote: Thanks for the reply, Your advise is appreciated and i'm going to agree with you.  My question now is what stratagy would you

[nhusers] Re: DTO's New to NH

2009-10-19 Thread José F . Romaniello
I don't know that, because I even don't know why do you need a DTO. DTO is the acronym of Data Transfer Object, should be simple, you don't want to transfer something whit nhibernate inside. Try in your service; or if you will use NHibernate to fill the DTO, in your DAL. Sompeople use AutoMapper

[nhusers] Invariants spanning more than one Aggregate Root

2009-10-19 Thread Ramin
I have been pondering over this problem for quite a while and have not come up with a satisfactory solution yet. Assume you have two ARs, customer and order. I don't want the order to be part of the customer AR, because I don't think that two users working on orders simultaneously should engage

[nhusers] Re: DTO's New to NH

2009-10-19 Thread José F . Romaniello
uh! sorry, I have some misspelled words! with, some people 2009/10/19 José F. Romaniello joseromanie...@gmail.com I don't know that, because I even don't know why do you need a DTO. DTO is the acronym of Data Transfer Object, should be simple, you don't want to transfer something whit

[nhusers] Re: DTO's New to NH

2009-10-19 Thread Kurt
This is showing my lack of experience here: I am trying to do exactly that, but don't know which tools or where the DTO's should live. given this Ayende snipit: public class OrderToOrderDTO { public delegate void Transformer(Order o, OrderDTO d); ListTransformer transforms = new

[nhusers] Re: DTO's New to NH

2009-10-19 Thread YankeeImperialistDog
That's ok, i forgot to add information. my question continued: my first reaction is to create a new project specificly for DTO, but complication is what i'm trying to avoid, so i think it would be better to make it part of the Services project that handles commands. My interfaces are there

[nhusers] Re: DTO's New to NH

2009-10-19 Thread Chris Geihsler
The DTOs should live in the same project that defines your service interfaces. The interfaces are the operations your service consumers can request, and the DTOs are the messages passed into and out of those service methods. The Object - DTO transformers (aka mappers, aka assemblers) should live

[nhusers] Re: DTO's New to NH

2009-10-19 Thread YankeeImperialistDog
thanks you both for the help. Appreciated! On Oct 19, 10:47 am, Chris Geihsler see...@gmail.com wrote: The DTOs should live in the same project that defines your service interfaces. The interfaces are the operations your service consumers can request, and the DTOs are the messages passed into

[nhusers] DTO naming conventions

2009-10-19 Thread YankeeImperialistDog
i'm really going overbord with DTO's in my quest for the correct way. what do some of you consider correct for property naming? given a Customer and CustomerDTO (class) each with an id and a string for a Name property Customer.ID Customer.Name what would the CustomerDTO properties be?

[nhusers] Re: session gets NULL when my program makes use of Castle Dynamic Proxy

2009-10-19 Thread Humberto Marchezi
Hi, If somebody is interested. I moved to Dynamic Proxy 2 and the problem disappeared. Apparently it is a bug in Castle Dynamic Proxy 1. On Fri, Oct 16, 2009 at 10:26 AM, Humberto Marchezi hcmarch...@gmail.comwrote: Hi, I use Castle Dynamic Proxy to insert aspects in the system we are doing

[nhusers] Re: problems with sessions on different threads

2009-10-19 Thread Artur Dorochowicz
Francisco, Sorry for such a late reply, it was a busy time recently. I have tried your suggestion and it did not help. I have completely disabled Castle Logging Facility and even removed log4net config file. Still, I get the alert in NHibernate Profiler. I see that Jan involved Ayende in the

[nhusers] Re: NHibernate.Search : Index all fields

2009-10-19 Thread Simon Laroche
Hi Mathieu, For a simple case like that, your class bridge should work like that (from memory): [Indexed] [ClassBridge(typeof(ClassBridge))] public class Entity { public string Foo{get;set;} public string Bar{get;set;} } public class ClassBridge:IFieldBridge {

[nhusers] Strange behaviour when saving an object graph

2009-10-19 Thread Neal Blomfield
I have the following model: user belongs to an account M:1 account has an owner 1:1 account has many users 1:M the owner of an account is also belongs to that account. mapped with FNH mapping.References( user = user.Account ) .Column( AccountId ) .Cascade.All(); ( where mapping is

[nhusers] The query performance of the LINQ provider is atrocious

2009-10-19 Thread aemami
Comparing NHibernate's LINQ provider to the only other ORM I have tried, which is LightSpeed, the performance of queries for NHIbernate is horrible. It is at least 2 to 5 times slower for fairly basic queries. You guys really should focus on LINQ. Most people don't want to use the Criteria api

[nhusers] Sub object mapping

2009-10-19 Thread alish
I need to write mapping file for below classes. Problem is, I have no table in database for Branch, just need an ıd for MAINBRANCHCODE field. My mappin document is as below. Error is Could not find a getter for property 'Information.MainBranch.Id' in class 'PromissoryNotes.Server.Data.Bundle'

[nhusers] Filter on a base class property

2009-10-19 Thread dmitry
I have a hierarchy of classes where Company and Person inherit from the class Contact. Each of the 3 classes has a separate underlying database table. The base Contact class has a boolean property IsActive. I created a simple filter with the condition Active = 1. The problem is if I apply the

[nhusers] Most Urgent Issue :NHibernate + Remoting + LazyLoading - Has anyone gotta workaround??

2009-10-19 Thread SGK
I am at a stage in my project where I cannot chnge to another ORM. My application looks like : 1) Windows Forms - Presentation Layer 2) BusinessObjects-Entities/Custom,Generic- BindableAndFilterableCollections/EntityMappings -Serializable objects 3) Server - DataRepository/UserAuthentication etc

[nhusers] NHibernate and Sybase Case Statement null check

2009-10-19 Thread Brian Williamson
= I have table mytable where value of column myValue is null. I have application where NHibernate calls Sybase Stored procedure. In procedure,I have Case Statement where I check for null for a value. Select Case myValue when null then 0

[nhusers] Re: Where clause for collection mapping and joined subclass

2009-10-19 Thread dmitry
I have the exact same problem with filters. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to

[nhusers] Re: Batching inserts of multiple types

2009-10-19 Thread fknebels
I'm running into the same problem. When I strip down my code and only insert into one table (mapped type), the batching works correctly. Once I try to batch across a number of types, the statements no longer are batched. Is this by design? if it's just grouping sql statements together,

[nhusers] Re: The query performance of the LINQ provider is atrocious

2009-10-19 Thread Tuna Toksoz
http://lkml.org/lkml/2000/8/25/132 Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Tue, Oct 20, 2009 at 1:30 AM, aemami aemam...@gmail.com wrote: Comparing NHibernate's LINQ provider to the only

[nhusers] Re: Batching inserts of multiple types

2009-10-19 Thread Fabio Maulo
The batch is per persister.If you want you can try a different behaviour but take care... don't feel so happy at the first success, try it in some complex scenario saving objects graph with different association/aggregation. 2009/10/19 fknebels fkneb...@gmail.com I'm running into the same

[nhusers] Re: Most Urgent Issue :NHibernate + Remoting + LazyLoading - Has anyone gotta workaround??

2009-10-19 Thread Fabio Maulo
Most Urgent Issue!!! 2009/10/19 SGK himanshukodw...@gmail.com I am at a stage in my project where I cannot chnge to another ORM. My application looks like : 1) Windows Forms - Presentation Layer 2) BusinessObjects-Entities/Custom,Generic- BindableAndFilterableCollections/EntityMappings

[nhusers] Re: Most Urgent Issue :NHibernate + Remoting + LazyLoading - Has anyone gotta workaround??

2009-10-19 Thread José F . Romaniello
Something that doesn't take care of such things doesn't deserve to be called architecture. You have a jenga/yenga architecture, so you will not get a simpler/pluggable/[put pretty words here] solution. http://es.wikipedia.org/wiki/Jenga http://es.wikipedia.org/wiki/JengaI don't know if this game

[nhusers] Re: Most Urgent Issue :NHibernate + Remoting + LazyLoading - Has anyone gotta workaround??

2009-10-19 Thread Neal Blomfield
Due to the nature of your request and the timeframes within which you appear to need said request satisfied, I think commercial NHibernate support is probably your best option for getting this resolved. I believe both Ayende and Fabio Maulo provide commercial consulting for NHibernate problems

[nhusers] Re: Transaction not rolling back - who's bug is this?

2009-10-19 Thread acl123
Ok thanks, my bigger problem is here: http://groups.google.com/group/nhusers/browse_thread/thread/64d608afc2cd01c3 On Oct 19, 4:23 pm, Fabio Maulo fabioma...@gmail.com wrote: your are calling Flush 2009/10/18 acl123 andrewclawre...@gmail.com The following code demonstrates a misleading

[nhusers] Re: More unexpected transactionscope behaviour

2009-10-19 Thread acl123
By the way I am using Session-Per-Web-Request as this appears to be the recommend way to use NHibernate with Asp .NET. This means that I definitely don't want to be wrapping the entire session in a transaction (the method that Ayende uses on his blog). I want to be using TransactionScope like

[nhusers] Re: Sub object mapping

2009-10-19 Thread Germán Schuager
Take a look at this: http://nhforge.org/doc/nh/en/index.html#components On Mon, Oct 19, 2009 at 9:01 AM, alish alikemalhas...@gmail.com wrote: I need to write mapping file for below classes. Problem is, I have no table in database for Branch, just need an ıd for MAINBRANCHCODE field. My

[nhusers] Re: The query performance of the LINQ provider is atrocious

2009-10-19 Thread Alec Whittington
Tuna - to be perfectly honest, that was a bullshit response on your part. I really do not think ANYONE thinks the performance of NHibernate.Linq is on par with L2S. Not only that but using Nh.Linq is painful at best when it cannot do quite a few things that L2S or L2O can do. Doing almost anything

[nhusers] Re: The query performance of the LINQ provider is atrocious

2009-10-19 Thread Craig van Nieuwkerk
I tend to agree with you Alec. The current Nh.Linq is rubbish. I still use it for very basic queries, ie select name from customer where customerid = 1, but any more and it is very close to useless. I really really hope the new Linq provider Steve Strong is developing is close to what L2S offers.

[nhusers] Re: The query performance of the LINQ provider is atrocious

2009-10-19 Thread José F . Romaniello
I'll defend the response of Tuna. Yes, I agree, the implementation of linq is very immature compared to other frameworks. But, I think the first mail is very immature too, because he is comparing performance without showing the code... so the best answer is show me the code. He doesn't say that

[nhusers] Re: More unexpected transactionscope behaviour

2009-10-19 Thread Fabio Maulo
Personally I don't know what you are talking about.You can have x transactions inside the same nh-session. session-per-request is a pattern well documented and with thousands of examples. In your code the first transaction is rolled-back because the transaction is disposed without commit that

[nhusers] No persister for: System.Int64

2009-10-19 Thread Scott White
What could go wrong that would cause NHibernate to not know the persister for intrinsic types like Int64? exception: No persister for: System.Int64 IListDeposit list = new ListDeposit(); list.Add(new Deposit()); foreach (Deposit o in list)

[nhusers] Re: No persister for: System.Int64

2009-10-19 Thread Fabio Maulo
Are you joking ? Session.Save(Session.Save(o)); // throws exception what you are expecting from that sentence ? 2009/10/19 Scott White scott.w.wh...@gmail.com What could go wrong that would cause NHibernate to not know the persister for intrinsic types like Int64? exception: No persister

[nhusers] Re: The query performance of the LINQ provider is atrocious

2009-10-19 Thread Tuna Toksoz
I know, i couldn't resist though :) Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Tue, Oct 20, 2009 at 4:47 AM, Alec Whittington alec.whitting...@gmail.com wrote: Tuna - to be perfectly

[nhusers] Re: The query performance of the LINQ provider is atrocious

2009-10-19 Thread Tuna Toksoz
Btw, Alec, This message was his/her first message in the group, and it was just a complaint without any offer to help, just complaints. By show me the code, I meant, any help is appreciated. The way that I do is might be rude, i admit, but sorry, this group is not for complaining but for sharing.