You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Michael Gentry <mg...@masslight.net> on 2009/11/02 16:27:44 UTC
Re: failure to commit part of the changes
Hi Bryan,
Is this similar to what Evgeny was talking about on the developer list
for CAY-1300?
http://issues.apache.org/jira/browse/CAY-1300
mrg
Re: failure to commit part of the changes
Posted by Bryan Lewis <jb...@gmail.com>.
Resending my last post. The list rejected it as spam, probably because I
sent two posts in the same minute.
Now that I've had a day to cogitate on it and to re-read CAY-1008, the issue
> I addressed in my "model validation" code wasn't the important one. Having
> redundant DbRelationships isn't risky; it's ony a cleanliness issue. Having
> multiple ObjRelationships sharing the same DbRelationship is the case in the
> Jira. I wrote a little more code today in EntityResolver to check for that:
>
> private void validateObjLayer()
> {
> for (DataMap map : getDataMaps()) {
> for (ObjEntity entity : map.getObjEntities()) {
> ArrayList dbpaths = new ArrayList<String>();
> for (ObjRelationship rel : entity.getRelationships()) {
> String dbpath = rel.getDbRelationshipPath();
> if (dbpaths.contains(dbpath)) {
> // Redundant ObjRelationships can lead to
> misbehavior; see CAY-1008.
> logger.warn("!! Found redundant ObjRelationship "
> + entity.getName() + "."
> + rel.getName()
> + " sharing DbRel " + dbpath);
> }
> dbpaths.add(dbpath);
> }
> }
> }
> }
>
> So you might see in the log at start-up:
>
> !! Found redundant ObjRelationship Company.industry2 sharing DbRel
> industry
>
>
>
Re: failure to commit part of the changes
Posted by Bryan Lewis <jb...@gmail.com>.
I don't think so. One of my patches merely prints more details about the
auto-supplied runtimeRelationships at startup. The Jira is talking about
formatting the QueryLogging throughout the session. Sort of related, I
guess, in that both are trying to improve the readability of the log.
On Mon, Nov 2, 2009 at 10:27 AM, Michael Gentry <mg...@masslight.net>wrote:
> Hi Bryan,
>
> Is this similar to what Evgeny was talking about on the developer list
> for CAY-1300?
>
> http://issues.apache.org/jira/browse/CAY-1300
>
>
> mrg
>