In "theory" the isAssignableFrom method on the underlying MetaModel & Range classes should be able to test for a legal/automatic type conversion, but it looks like that code is commented out in the current version of the Validator class. In any case, it certainly seems that using the normal reference classes for the primitive types should work fine. Nullability is another benefit of using the reference classes.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Niels Hoogeveen Sent: Monday, April 05, 2010 8:42 AM To: [email protected] Subject: Re: [Neo] DatatypeClassRange usage If only reference classes can be added, what are appropriate types. Should I use java.lang.Integer when the underlying property value is and "int" and java.lang.Long when using a "long"? Kind regards, Niels Hoogeveen > From: [email protected] > To: [email protected] > Date: Sat, 3 Apr 2010 01:52:06 +0200 > Subject: [Neo] DatatypeClassRange usage > > > To model the datatype of a property, I tried to use the DatatypeClassRange. It seems this object only accepts reference classes, not primitive classes. > > I would like to state that a certain MetaModelProperty has the datatype "int". To do so, I thought I would have to provide the MetaModelProperty with a PropertyRange. The DatatypeClassRange seemed the only suitable option, but its fromStringRepresentation method loads the class through a Class.forName, so class "int", is of course not found, and the load of the PropertyRange results in a ClassNotFoundException. > > Is this a bug, is this a feature? > > Kind regards, > Niels Hoogeveen > > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > _______________________________________________ > Neo 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/ _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

