This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Which is most elegant and straight forward way to do it. Like JPA or Hibernate annotations in Java. Are there any plans to support it? Kind regards, Angel |
|
|
The honest answer is, "Because nobody has asked for it yet!" We tend to prioritise features based on customer feedback and because most customers use either XML or Fluent NHibernate those are the only two methods we have implemented so far. However, a deeper reason is using a designer is an alternative to writing XML or Fluent NHibernate or marking up attributes. You're specifying your mappings in the .nhmodel file instead of in XML or code. As it happens, we embed those mappings into the compiled assembly via XML or FNH (or possibly in future attributes), but you don't work with that: you work with the visual model, and should never have to worry about how the mapping info is embedded for run-time use. We are certainly open to adding support for attribute-based mappings, but we'd be keen to understand more about the use case before we consider implementing it! |
|
|
Thanks for your quick reply! I reckon the only valid reason is to make NHibernate(.NET) and Hibernate/JPA(Java) more alike, so the transition from one platform to the other is more seamless. Like in my case :-) And I would not mind paying $99 for that. IMO and from the way and I understand software engineering, I like attributes/annotations for the ORM mapping because:
The visual designer is alright for the initial approach to reverse engineer the data model from the RDBMS and generate the ORM mapping files, but more often than not, you need to tweak or customize the mapping parameters. And from that point onwards you cannot use the designer because you will most likely loose your customizations. Apart from this I would advise to implement this new feature because it would be a competitive advantage for your product as there is no good alternative that implements this feature (generation of ORM mapping attributes I mean). I would just add that the Castle ActiveRecord attributes approach is more elegant that the one included in the NHibernate core. Thank you very much for your attention and I hope you find these ideas interesting at least. Kind regards, Angel. |
|