Hi jackCHEN,
There has been a discussion previously on whether properties and
comments are the same thing or not. The consensus was that those are
two different things. Comments are actually DB-related artifacts (and
therefore won't probably be attached to any Obj* metadata objects, or
relationships, etc.). Properties are arbitrary strings attached to any
mapping object.
I assumed you are working on the later feature (properties, not
comments)? Also IIRC Andrey was looking at building comment support.
Andrey please correct me if I'm wrong.
Andrus
On Jun 1, 2009, at 11:38 AM, chen li wrote:
Thanks Andrus. Cayenne is good project and there are a lot of
genius
who help it to grow up.
"CayenneMapItem" is just a temporary name. The purpose of the
class is only providing a set of method which related to comment.
If the
function of the class will be expended in future,it can be
refactored and
implements a interface which defining the behavior of comment. So i
think
the name maybe "CommentMap","AbstractMap", or "MappingObject". Just a
suggestion.
I think the info Class is necessary to deal with comment.
Comment is
a element node which can be added other element node such as
Obj-Entity,Db-Entity,Obj-attribute etc in a DataMap tree. Any
element node
in DataMap Tree can have comment as their sub element node if they
need. So
a comment has to record its father element node for be reached when
the
whole datamap tree is dealed with.
"Info" name is a temporary name.Maybe "Comment","Annotation"
are much
more close.
jackCHEN
2009/6/1 Andrus Adamchik <[email protected]>
On Jun 1, 2009, at 8:50 AM, Aristedes Maniatis wrote:
Jack is an intern at ish who has been working on this task. We
discussed
the basic design strategy and class structure, and Jack has put
together
some code.
Great! Jack, welcome to the community :-)
We'd like some feedback about the approach, especially the idea of
superclassing the CayenneMapItems to allow for the code to live in
one
place.
I am ok with a common superclass of mapping objects. I don't like the
CayenneMapItem name though. We have no current notion of
"CayenneMap", so
"CayenneMapItem" is confusing (not that I am happy with the name
DataMap,
heh :-)). Maybe something like MappingObject, which feels more
generic along
the lines of "Object Relational Mapping"?
Also I am not sure we need a special Info object. A simple
Map<String,
String> attached to a MappingObject should be enough from what I
see. The
current Info object has a notion of a parent. Could you elaborate
why is it
a tree structure?
"Info" name is a bit confusing, at least to a Java programmer (I
know it
was used in EOF). Everywhere else in Cayenne a similar unstructured
String
data attached to an object is called "property". I suggest we stick
with
this naming convention.
Andrus