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 again, I created a simple many2many relationship. It work fine (also tables are created) if I would use the collection kind bag. But when using 'List' I can't get it run. I tried several combinations, but none works. I need to use the 'List', otherwise there will be many performance problems when updating the relationships. Working with bags will update always all relationship items. Working with an IdBag (I think thats your list) will update only the changed ones. When updating the database from the model, I get these error message: NHibernate DesignerThe following many-to-many associations cannot be synchronised because they are to composite-keyed entities or are not of collection type Bag:
OKMaybe fine - if you could help. I tried this with the official version and later with the latest nightly build - always the same problem. Best regards Markus |
|
|
As the message says, we don't currently support database sync for many-to-many associations other than Bags. However in the next nightly build I have added support for associations of collection type List. This will be available from about 1200 GMT. Note that List corresponds to a NHibernate list mapping, not to idbag. We can look at adding support for idbag if that would be useful to you, though it might take a bit longer. |
|
|
Hi Ivan, thanks for your support. As long as we only use test data for our new project, the bag or list will work. But later we sure have to switch to IdBag. I had a performance problem in one of the last projects of mine. We used bags. If anything was changed in the many2many table, NHibernate always deletes all many2many items related to the domain (e.g. Contact) and inserts then all again. With using the idbag then, only the changed many2many item was updated. That was a quite performance jump :) Would be nice if you update this post, if the idbag is supported or if there is a workaround. Do you have an idea of how long it will take? Best regards Markus |
|