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
|
Hi, I bought the Designer to use ORMapping the first time, but I have huge problems to get it working in practice. What I need in form of a tutorial would be:
I read a lot of tutorials on NHibernate but I really need some hints in using the designer correctly. Or if someone has a little VS project for me on these topics, that would help a lot. Let's take this example:
The "Order" is saved after the Commit, but not the "OrderItem". So I guess it's the settings in the Designer which are wrong on my side. Thanks a lot Kay |
|
|
We are planning to put together some tutorials and screencasts on the designer -- thanks for the feedback as this will help us to prioritise this work! Regarding your particular code sample, I believe if you set Is Dependent to "true" on the association, then this should automatically propagate the save. IsDependent relates to the NHibernate 'inverse' flag which is required for automatic propagation to work (otherwise you need to write your code the other way round, e.g. |
|
|
I got it working meanwhile. My problems are not really on the service / server side of my project but on the client side. I have a WCF service which uses ORMapping, but for now on the client side I have the feeling that all the benefits of ORMapping are useless. I really struggle with the fact that I am not able to do the wonderful and easy OR support on the client side with WCF and that I don't know what is "best practice" in this case. The example above works very well on the service side but on the client side I am not able to "build up" objects because it seems that the "relational component" is missing there (obviously because of the technique I guess). Here is an example (maybe it's total crap, because I have no better way for now): Client:
Here the problem is that I am not able to add OrderItems to the Order directly. If I do that, the relation is missing. So I have to do that on the service side. Service:
So my solution is: Send all data separately to the service and use the NHibernate mechanisms to put them together. Maybe that's a WCF specific (or Webservice in general) problem. |
|
|
I think this question is now more about how to use NHibernate with WCF services than specifically about the NHibernate Designer tool. We aren't really in a position to provide support on NHibernate itself, though of course we're very happy to support the modelling tool and to enhance it to make it work more smoothly with WCF. For questions on NHibernate itself, you'll get a better answer if you ask somewhere that NHibernate experts hang out, such as Stack Overflow or the NHibernate mailing list. For NHibernate and WCF, it looks like there are also some CodeProject postings that could be really helpful. Obviously these won't be written in terms of the NHibernate Designer, so if you need help translating the advice back to the designer, we'll gladly provide that; or if you find you need features that the NHibernate Designer doesn't currently provide, we'd love to know about them so we can add them to the product for you. We can also provide guidance on using the NHibernate Designer to support your chosen approach, for example to code-generate Data Transfer Objects (DTOs) or other client-side proxies. But when it comes to question on NHibernate itself we really don't have the same level of expertise as the broader NHibernate community. |
|