Hello guys, I am toying with your product and it seems that there are some good ideas behind it. However there are some bugs, for instance as soon as I tried to work with my first model I realized that your paired associations don't work.

Here is my model:

[HierarchyRoot]
    public class Consumer : Entity
    {
        [Field, Key]
        public int ID { get; private set; }

        [Field]
        [Association(PairTo="Consumer")]
        public Account Account { get; private set; }
    }

[HierarchyRoot]
    [KeyGenerator(KeyGeneratorKind.None)]
    public class Account : Entity
    {
        [Field, Key]
        public Consumer Consumer { get; private set; }

        public Account(Consumer consumer) : base(consumer)
        {
        }
    }

So, when I create account for some consumer I expect the consumer's account property to be set to newly create account. But it isn't. Is there any mistake?

Consumer consumer = new Consumer();
    Account account = new Account(consumer);

    // account.Consumer == consumer, but:
    // consumer.Account == null, why?

Updated at 01.04.2010 9:10:01

v4.2.0 installers were updated to the latest stable revision.

Thank you, Alex. I just write to inform you that everithing is OK now.

This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by jbivens.

asked Mar 15 '10 at 19:52

Editor's gravatar image

Editor
46153156157

Hello Jason,

Thanks for your report. It is definitely a bug, to be fixed ASAP.

(Mar 15 '10 at 19:52) Dmitri Maximov Dmitri%20Maximov's gravatar image
(Mar 15 '10 at 19:52) Alex Yakunin Alex%20Yakunin's gravatar image

The bug is fixed in the repository. See nightly build.

(Mar 15 '10 at 19:52) Dmitri Maximov Dmitri%20Maximov's gravatar image

I'll update regular DO4 v4.2 installer today and drop the update notification here.

(Mar 15 '10 at 19:52) Alex Yakunin Alex%20Yakunin's gravatar image

v4.2.0 installers were updated to the latest stable revision.

(Mar 15 '10 at 19:52) Alex Yakunin Alex%20Yakunin's gravatar image

Thanks for the confirmation!

(Mar 15 '10 at 19:52) Alex Yakunin Alex%20Yakunin's gravatar image
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×573

Asked: Mar 15 '10 at 19:52

Seen: 1,589 times

Last updated: Mar 15 '10 at 19:52

powered by OSQA