Declaration on transparent activation and activation of db4o

Source: Internet
Author: User

For more information about transparent activation, see here: http://www.cnblogs.com/redmoon/archive/2008/02/23/1078619.html

It is pointed out that the transparent activation feature enables db4o to automatically handle activation hierarchies, so that the object attributes can be automatically loaded on demand when they are non-basic types.

I don't know how it works, but I use it very calmly until a subitem that loads the set property is empty, there is no solution to the wall ~

It was suspected that db4o had a bug in class inheritance support ~

Later, it was found that the declaration of all levels of activation (db4ofactory. configure (). objectclass (typeof (myclass1 )). after cascadeonactivate (true), the attribute can be obtained successfully. It can be seen that this problem is still caused by transparent activation-it is not smart enough.

The attribute that causes the problem is a list <> set attribute, while other attributes do not matter whether they are basic type or custom type. Therefore, it is suggested that transparent activation is not yet supported for the set.

Pay attention to the activation Declaration, for example, the following activation levels:

Db4ofactory. Configure (). objectclass (typeof (myclass1). cascadeonupdate (true );
Db4ofactory. Configure (). objectclass (typeof (myclass1). cascadeonactivate (true );

Note that the type of the highlighted part should not be an abstract class or interface. It should be a clear absolute type (that is, if you want a class and its parent class to be specified for this declaration, you need to declare them separately, rather than just declaring the parent class), otherwise it does not work.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.