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'm having some trouble with mapping a computed column. I know that Nhibernate supports the notion of read-only columns. Is there a way to do this in the designer that perhaps I am overlooking? |
|
|
If I understand correctly what you would be wanting is to have the designer generate a read-only field and associated mapping by marking the property as read only? Currently this is not something which is supported so this would need to be set up manually. Let me know if I am mis-understanding what you are attempting to do though.
|
|
|
Hi Jeremy Exactly right. It would be a very handy feature for me. On a side note and fairly related... is there any way in which I can make a code change to model that is generated by the designer and have it not be touched by the designer in any way so that the changes can be persisted? I'm becoming fairly familiar with NHibernate now and am finding that there are a few instances where I would like to make a specific change to the model that the designer does not handle, but that I know how to do in say, the XML mapping. Antony |
|
|
Hi Anthony, Just in relation to your last point (I'll leave Jeremy to comment on the read-only feature). Could you let us know what changes you'd want? Since effectively XML mapping changes mean you're looking at enabling or disabling features in NHIbernate, it's likely that we could look at adding support for these changes directly into the product. We try to bundle up these sorts of changes so perhaps knowing them when looking at the read-only support could mean they get rolled in together. Thanks, John-Daniel Trask |
|
|
Hi John-Daniel Yes, I'd be looking for a feature that would allow me to set a property of the generated entity property to "read-only". |
|