﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Paul Roberts commented on A few reasons to like NHibernate</title><description>Probably not the best place to say this ;), but Diamond Binding has been pretty good at bringing nhibernate/active record based ORM to the masses where I work. I've found myself using it too for greenfields development.
  
  
Was there any luck with getting them to support castle builds out the box?
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment52</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment52</guid><pubDate>Mon, 07 Apr 2008 06:07:20 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Milton,
  
Take a look at Castle ActiveRecord
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment51</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment51</guid><pubDate>Fri, 14 Mar 2008 15:23:41 GMT</pubDate></item><item><title>Milton Pividori commented on A few reasons to like NHibernate</title><description>Do you know SQLObject (Python) or Gentle.NET? I used the latter, and what I liked about it is the ability to write the mapping data in the class, not in a different file, what avoids sync between them when you changed something.
  
  
What do you think about this? Can this be done with NHibernate?
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment50</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment50</guid><pubDate>Fri, 14 Mar 2008 15:21:35 GMT</pubDate></item><item><title>Oran commented on A few reasons to like NHibernate</title><description>@Tim Scott: there is a new project called NHibernate.Remote that supposedly handles lazy-loading remote NHibernate entities via WCF.  I'm not saying this is a good thing, but it definitely piques my morbid curiosity...
  
http://slagd.com/?p=4
  
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment49</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment49</guid><pubDate>Fri, 14 Mar 2008 02:01:36 GMT</pubDate></item><item><title>Stuart Cullinan commented on A few reasons to like NHibernate</title><description>Kenny,
  
Unless you are dealing with a legacy database it would be in your interests to build your application top down or middle out. 
  
This would mean designing your application with the focus on your objects/entities and services you require and that make sense within your domain, leaving the database to serve as a persistence mechanism for your object/domain model.
  
Using the database as the source of the design of your application will make your object model awkward and unnecessarily constrained.
  
That is my experience anyway...
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment48</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment48</guid><pubDate>Tue, 11 Mar 2008 20:43:35 GMT</pubDate></item><item><title>Kenny Bearly commented on A few reasons to like NHibernate</title><description>I'm using NConstruct for NHibernate mapping files generation and it satisfies most of my needs. I'm working mostly with MS SQL and sometimes with Oracle databases. Having some problems with Oracle mappings but it seems some bugs are resolved now (didn't have chance to test yet). 
  
  
Can somebody explain how do you decide between generating database from your object model or generating mapping files from database? 
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment47</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment47</guid><pubDate>Tue, 11 Mar 2008 19:45:11 GMT</pubDate></item><item><title>Pavel Samokha commented on A few reasons to like NHibernate</title><description>good explanation, but it may be more helpful if for all items you provide links to more detail information.
  
  
for example, I know and use schema generation with hbm2ddl but info about updating base is new for me and there aren't enough documentation about it - so links to details can appreciably help.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment46</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment46</guid><pubDate>Mon, 10 Mar 2008 20:51:04 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Jeff,
  
No one on the team regularly test on Oracle, but some people from Oracle have contributed to NHibernate, so that is fairly surprising.
  
Can you create test cases for that?
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment45</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment45</guid><pubDate>Mon, 10 Mar 2008 20:01:00 GMT</pubDate></item><item><title>Jeff Tucker commented on A few reasons to like NHibernate</title><description>Having written data access layers before, I truly appreciate what NHibernate can do but I have one major complaint:  Oracle support.
  
Last I checked, Oracle support did not include stored procs or CLOBs which are critical to our business model.  If this has improved since the last time we investigated NHibernate at my company (I think it was Nov of 2007) then I'd love to use it.  
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment44</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment44</guid><pubDate>Mon, 10 Mar 2008 19:13:19 GMT</pubDate></item><item><title>Nick Aceves commented on A few reasons to like NHibernate</title><description>Makes sense. Thanks for clarifying.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment43</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment43</guid><pubDate>Mon, 10 Mar 2008 18:16:42 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>It supports lazy loading of entities from _other_ tables, not of the same table. (not quite true, but close enough)
  
The reason is that in most cases, it is much cheaper to load the entire row in one go, than loading them one by one.
  
The exception is when you have a BLOB in the table.
  
This is a problem from the programming perspective, because we would need to handle the ldfld stuff, and we can't do that without doing IL rewriting.
  
We can do that using property interception, but it would trip people who are used to access the field inside the class
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment42</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment42</guid><pubDate>Mon, 10 Mar 2008 17:40:26 GMT</pubDate></item><item><title>Nick Aceves commented on A few reasons to like NHibernate</title><description>Oren,
  
  
I thought NH supported lazy-loaded properties using proxies. It does support lazy-loaded 1-to-1 relationships, right? I guess this is different than a lazy-loaded property, but not by much. Maybe I misunderstood this capability.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment41</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment41</guid><pubDate>Mon, 10 Mar 2008 17:31:25 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Chris,
  
Actually, 18 is not supported :-)
  
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment40</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment40</guid><pubDate>Mon, 10 Mar 2008 16:16:32 GMT</pubDate></item><item><title>Chris Chew commented on A few reasons to like NHibernate</title><description>Ayende, great post!  But I think you missed three points that are so easy take for granted when you're using NHibernate:
  
  
16. Ability to effortlessly add or remove properties to the results of select queries.
  
  
17. Adding a field to the schema and model is only a 3 step process (alter table, mapping file, and new {get; set;}) before it is immediately available to all existing code.  Whereas it is a 5+n step process for other strategies (where n is the number of places the model entity is fetched).
  
  
18. Lazy-loaded properties - The ability to specify that certain large fields be loaded only upon specific request is a life-saver when you run into the unfortunate instance where large binary data is stored in the database.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment39</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment39</guid><pubDate>Mon, 10 Mar 2008 16:14:06 GMT</pubDate></item><item><title>Colin Jack commented on A few reasons to like NHibernate</title><description>&gt; In terms of tooling none of the generators/templates (MyGeneration, &gt; CodeSmith) I've used did it job properly. There was always a 
  
&gt; problem with M:1 relations. I might be me but I think I would find 
  
&gt; quite a few people that share the same opinion.
  
  
I tried a few NHibernate code generation templates at the beginning and I agree they didn't work. To be fair though doing the mapping manually is relatively easy in most cases.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment38</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment38</guid><pubDate>Mon, 10 Mar 2008 08:05:50 GMT</pubDate></item><item><title>Pawel Pabich commented on A few reasons to like NHibernate</title><description>Different people, different experience :)
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment37</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment37</guid><pubDate>Mon, 10 Mar 2008 00:55:09 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Pawel,
  
I am sorry, but the situation that you describe conflicts with my experience.
  
It is very easy to start using NHibernate, and reaping the benefits occurs almost at once.
  
Yes, there is a lot of depth there, but you generally don't have to deal with it.
  
From my experience, most of the initial problems people have with NHibernate is not understanding the unit of work model, very bad DB schema or just standard bad practices.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment36</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment36</guid><pubDate>Sun, 09 Mar 2008 21:50:44 GMT</pubDate></item><item><title>Stuart C commented on A few reasons to like NHibernate</title><description>Yeah, this is similar to what I did, however I injected my mapping rewrite code into an implementation of INHibernateInitializationAware component.
  
I think that after seeing how you hooked into the model creation in ActiveRecord it just seemed cleaner as the rewriting code is nicely abstracted. 
  
But yes, looking at it again I suppose I could create this abstraction fairly easily myself...
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment35</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment35</guid><pubDate>Sun, 09 Mar 2008 21:21:25 GMT</pubDate></item><item><title>Colin Jack commented on A few reasons to like NHibernate</title><description>@Ayende
  
Thanks and yeah I like it a lot.
  
  
We've never had to insert reference/static data (e.g. Countries) for testing as its all part of our database baseline so going for an approach like that would be a lot of work. If we ever need to do it then we'd know where to start though so ta.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment34</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment34</guid><pubDate>Sun, 09 Mar 2008 19:32:27 GMT</pubDate></item><item><title>Pawel Pabich commented on A few reasons to like NHibernate</title><description>Ayende,
  
Don't get me wrong. I know that I you need to spend some time to get familiar with a tool. Let me put it this way. It takes 10 times less time to be fully productive with Llblgen than with NHibernate. It's one of the reason why it's so hard to sell NHibernate. It's powerful but it's hard to grasp. 
  
  
In terms of tooling  none of the generators/templates (MyGeneration, CodeSmith) I've used did it job properly. There was always a problem with M:1 relations. I might be me but I think I would find quite a few people that share the same opinion.
  
  
Log4Net is easy to use and for sure much easier then Microsoft Logging block which is I suppose the main reason why it is all over the place. 
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment33</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment33</guid><pubDate>Sun, 09 Mar 2008 15:33:28 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Stuart,
  
The situation with NHibernate is different, you need those events with Active Record because AR hides the creation of the session factory.
  
With NHibernate you simply do:
  
  
cfg.AddAssembly(...);
  
  
// rewrite model here.
  
  
cfg.BuildSessionFactory();
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment32</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment32</guid><pubDate>Sun, 09 Mar 2008 13:16:30 GMT</pubDate></item><item><title>Stuart C commented on A few reasons to like NHibernate</title><description>Hi Oren,
  
Yes I agree there is alot to love about nhibernate and alot to look forward to aswell (2.0 bring it on). As developers we always want more though and without trying to dispel the present aura of love surrounding it, there are a few things I would love to see in future releases (if they aren't already planned that is).
  
For example I really liked mapping rewriting functionality you implemented in Rhino.Security, however this seemed trivial when using ActiveRecord if not only because you could subscribe to events using the ActiveRecordStarter to hook into the model creation. Similar events should be built directly into nhibernate to allow to us to catch SessionFactory creation and modify mapping at this point. I managed to implement this by injecting my own mapping rewrite functionality just before Cfg.BuildSessionFactory() which felt a bit disjointed. In addition I found documentation lacking when it came to the nHibernate Type system or using it programmatically to be specific. In the end it turned out to be fairly trivial to implement and with regards to documentation I can appreciate these scenarios are probably slightly rare and obscure.
  
That said I always feel a bit guilty requesting features or moaning about the lack of them as I could really just implement these myself and submit a patch...I would however prefer to have something like this implemented by a trusted and experienced nhibernate contributor such as yourself (hint, hint). :-)
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment31</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment31</guid><pubDate>Sun, 09 Mar 2008 09:43:15 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Sam,
  
There is not difference between SQL Express and any other edition of SQL Server.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment30</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment30</guid><pubDate>Sun, 09 Mar 2008 05:06:01 GMT</pubDate></item><item><title>Sam V commented on A few reasons to like NHibernate</title><description>Excellent!  I was getting my info from the link below, which apparently isn't comprehensive or up-to-date.
  
  
http://www.hibernate.org/361.html
  
  
Thanks!
  
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment29</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment29</guid><pubDate>Sun, 09 Mar 2008 05:04:18 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Sam,
  
SQL Express has been supported for the last 3 years or so (yes, before its conception)
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment28</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment28</guid><pubDate>Sun, 09 Mar 2008 02:40:58 GMT</pubDate></item><item><title>Sam V commented on A few reasons to like NHibernate</title><description>Are there plans/thoughts on adding SQL Express support?
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment27</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment27</guid><pubDate>Sun, 09 Mar 2008 02:37:58 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Pawel,
  
If you want to learn a new tool, you need to understand it. No way around that. The documentation is fairly complete, and NHibernate in Action is very good.
  
About tools, there are out there, from VS designers to CodeSmith templates
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment26</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment26</guid><pubDate>Sun, 09 Mar 2008 01:19:30 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Colin,
  
Check out the Fluent Fixtures idea from Aaron
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment25</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment25</guid><pubDate>Sun, 09 Mar 2008 01:17:48 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Andres,
  
The port is complete, yes.
  
Test before you run this on production database.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment24</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment24</guid><pubDate>Sun, 09 Mar 2008 01:16:43 GMT</pubDate></item><item><title>Ayende Rahien commented on A few reasons to like NHibernate</title><description>Tim,
  
No, I don't have any suggestions, and I don't like this approach either.
</description><link>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment23</link><guid>http://ayende.com/3185/a-few-reasons-to-like-nhibernate#comment23</guid><pubDate>Sun, 09 Mar 2008 01:15:03 GMT</pubDate></item></channel></rss>