you shouldn't use gds with annozated enities 

the are no nodes etc but the delegate to nodes & rels

use graphdatabasecontext
or the repositories
please see the docs I'm on vacation

mobile mail please excuse brevity and typos

Am 15.08.2011 um 19:38 schrieb "etc1" <[email protected]>:

> When annotating an entity class with @NodeEntity, such as ...
> 
> @NodeEntity
> public class Movie {.....
> 
> ..this appears to cause many neo4j api methods to become incompatible with
> the custom entity type, in this case Movie, for example...
> 
> Movie rainman = new Movie("Rain Man", 1986).persist(); 
> 
> //can't use Movie type here since, ClassCastException on
> org.neo4j.kernel.impl.core.NodeProxy
> Movie retrievedMovie = (Movie)gds.getNodeById(rainman.getNodeId());    
> 
> //can't use Movie type, add() take only Node type
> gds.getIndex(Movie.class).add(rainman, "name", "Rain Man");
> 
> 
> 
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to