valchkou / cassandra-driver-mapping

JPA addon for DataStax Java Driver for Cassandra
58 stars 24 forks source link

Updated isSetterFor for polymorphism. #40

Closed ghost closed 9 years ago

ghost commented 9 years ago

Now you can have optional setters with different parameters (Enums, for example).

valchkou commented 9 years ago

sorry, didn't get what is your use case. could you please provide unittest along with your change? also, is it possible to use class.isAssignableFrom instead of just removing check?

ghost commented 9 years ago

Sorry, I should have explained it better. I already uploaded some tests of a use case. What I want to do is to be able to use Enums where they have an internal value different than their name. The ideal would be to use Enum directly and map it correctly, but I found it tricky to generalize an "Object to Enum" conversion. About the "removing check" I'm not sure what you mean, could you explain?

valchkou commented 9 years ago

Thanks for contribution, merged and published on MVN central.