incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Leau <costin.l...@gmail.com>
Subject Re[2]: [jcr-mapping] Mapping Node.getPath() to domain objects
Date Mon, 10 Oct 2005 17:27:15 GMT


> for describing unique identifier we can have something like that:
> <path fieldName="path">
> </path>
I would differ - the path can also be viewed as being a different
table. The path is not part of the object content so it shouldn't be
treated as one.
The database impose the object to have an id - a special field. Note
that it doesn't have to be a unique id over the database - smth that
would happen if the path is considered as part of the object.
The most approapriate method would be to require and id from the user
which can be generated or supplied by him/her.
This way the developer can chose if she/he wants a long/int or a
String UUID. Creating syntetic attributes based on an object will fail
eventually (for example if I move the path the object identity changes
- in the database world if I rename an object the identity is the
same).

-- 
Best regards,
 Costin                            mailto:costin.leau@gmail.com


Mime
View raw message