Fixed the issue with the removed method.

> From: [email protected]
> Date: Tue, 6 Jul 2010 15:22:14 +0200
> To: [email protected]
> Subject: Re: [Neo4j] Meta-model component: problem with renaming classes
> 
> 
> Great!
> 
> I've tested the 2 new methods.
> rename() works as expected.
> 
> With remove() there is an issue:
> once a class is removed, getMetaClass("name", false) returns a stale 
> MetaModelClass object if -- and only if -- that class has been renamed 
> before. It is expected to return null.
> If the class has not been renamed before remove() works OK.
> 
> Example:
> 
> // create class
> namespace.getMetaClass("My Class", true);
> // rename class
> namespace.rename("My Class", "New Class");
> // remove renamed class
> namespace.remove("New Class", true);
> // ERROR: this call returns a stale MetaModelClass object. It is expected to 
> return null.
> namespace.getMetaClass("New Class", false);
> 
> 
> Thank you very much for the quick action :-)
> 
> Cheers,
> Jörg
> 
> 
> On Jul 6, 2010, at 2:43, Niels Hoogeveen wrote:
> 
> > The modifications have been applied to trunk.
> > Niels
> > 
> >> Date: Mon, 5 Jul 2010 20:27:49 +0200
> >> From: [email protected]
> >> To: [email protected]
> >> Subject: Re: [Neo4j] Meta-model component: problem with renaming classes
> >> 
> >> 2010/7/5 Niels Hoogeveen <[email protected]>
> >> 
> >>> If Mattias agrees, I suggest adding the methods:
> >>> MetaModelNamespace#rename(String oldName, String newName)
> >>> MetaModelNamespace#remove(String name, Boolean forced)
> >>> If forced is false, throw exception when relations exist to other
> >>> MetaModelObjects or in case of a MetaModelClass, has associated instances.
> >>> If forced is true, all relationships are removed together with the
> >>> MetaModelObject.
> >>> I am willing to make the changes, but want approval from the Neo4J team
> >>> before making these adjustments.
> >>> Niels
> 
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
                                          
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to