Just in case anyone with a similar issue will come up with this
thread- the answer can be found on the spring forum:
http://forum.springframework.net/showthread.php?t=5218
On Dec 7, 6:00 pm, Nieve <[EMAIL PROTECTED]> wrote:
> Hello all,
> new to the list, hope I'll be able to contribute as well :)
> Before I begin, here's a bit of background: I'm working on a library
> cataloguing application using NHibernate + Spring.Net (the latest
> versions for both) strictly for educational reasons...
>
> The exception I've mentioned is thrown whenever attempting to do a
> session.SaveOrUpdate() on an object (library Item) containing a many-
> to-many property (IList<LibTransaction> Transactions). The mapping
> (using NHibernate.Mapping.Attributes) looks like this:
>
> [Bag(0, Access = "property", Lazy = true, Inverse = true, Name =
> "Transactions", Table = "ItemTransaction")]
> [Key(1, Column = "ItemID")]
> [ManyToMany(2, ClassType = typeof(LibTransaction), Column =
> "TransactionID")]
> public virtual IList<LibTransaction> Transactions
> {
> get { return transactions; }
> set { transactions = value; }
>
> }
>
> The exception is also thrown whenever attempting
> IPersistentCollection.SetCurrentSession() with the above mentioned
> property.
>
> It should be noted that the exception is thrown only after the
> Transactions property is lazily initialised.
>
> session management as well as transactions are being taken care of by
> the spring HibernateDaoSupport class and the spring transaction
> attributes respectively.
>
> I would be grateful for any idea or response!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---