More fun....

In order to keep referential integrity in the database, I'm trying to
do this:

public class Envelope
{
       [BelongsTo("LetterTypeId")]
        public LetterType LetterType { get; set; }

        public Envelope()
        {
            this.LetterType = LetterType.Find(1);
        }
}

(Where LetterType is another AR class.)  But when I do this, I get an
exception saying:

InnerException: System.InvalidOperationException
            Message="Timeout expired.  The timeout period elapsed
prior to obtaining a connection from the pool.  This may have occurred
because all pooled connections were in use and max pool size was
reached."

Which makes me think that there is some crazy recursion going on
that's sucking up all the connections. (I could be completely wrong
about that.)  Anyway, what is the correct AR way to initialize a
foreign key property in a constructor?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to