[db4o-om commit] r46 - wiki

1 view
Skip to first unread message

codesite...@google.com

unread,
May 13, 2008, 10:25:16 AM5/13/08
to db4o-om-c...@googlegroups.com
Author: tetyana.loskutova
Date: Tue May 13 07:22:29 2008
New Revision: 46

Added:
wiki/Object.wiki

Log:
Created wiki page through web user interface.

Added: wiki/Object.wiki
==============================================================================
--- (empty file)
+++ wiki/Object.wiki Tue May 13 07:22:29 2008
@@ -0,0 +1,10 @@
+Object Manager can operate on any java or .NET db4o database, because
it does not need class definitions to instantiate database objects.
Instead of real classes ObjectManager in fact instantiates Generic
Objects, which hold a database object information in an array of
fields. This approach is very powerful, however it introduces some limitations.
+Java enumerations
+
+Java enumerations (java.lang.Enum) hold the information in name and
ordinal fields. However, when an enumeration is used in a persistent
object it is not really necessary to save the whole enumeration to the
database, as it will be available from the classloader in runtime. That
is why db4o only saves the actual enumeration values together with the
object, and the values are bind to the enumeration when the object is
instantiated. For more information about the enumerations see Static
Fields And Enums.
+
+This approach allows to save database space and proves to be
efficient. However, if you are looking at an enumeration object using
ObjectManager, the enumeration will be constructed as a generic object,
therefore the binding procedure won't be triggered. This will affect
the following:
+
+ * enumeration type fields will show the class name instead of the
actual values, for example "com.examples.Colors" instead
of "Red", "Green" etc.;
+ * you won't be able to constrain queries on the enumeration field values;
+ * you won't see "name" and "ordinal" field values querying for the
enumeration type data.
\ No newline at end of file

Reply all
Reply to author
Forward
0 new messages