mexxik (9) [Avatar] Offline
#1
hello,

from the chapter 3, when trying to
~.model.Task roo> finder add --finderName findTasksByPriorityBetween

it returns:
Managed SRC_MAIN_JAVA/test/model/Task.java
Undo manage SRC_MAIN_JAVA/test/model/Task.java
java.lang.Integer cannot be cast to java.lang.Long


am i doing something wrong again?
mexxik (9) [Avatar] Offline
#2
Re: unable to add finder for an entity
i think something wrong with validation annotations
looks like they are blocking adding finders
krimple (141) [Avatar] Offline
#3
Re: unable to add finder for an entity
My apologies, the samples are a bit buggy. I am actually going through Chapter 3 samples this weekend, and if I can get you an update via the forum on what I correct for this error, I will do so.
krimple (141) [Avatar] Offline
#4
Re: unable to add finder for an entity
I think the quick answer (theory) is that Longs aren't necessary for the priority example, and perhaps cause problems when generating the finders. I'll see when I look at that code.
krimple (141) [Avatar] Offline
#5
Re: unable to add finder for an entity
Ok, one answer so far. The @Min and @Max annotations take a long for each parameter. So, use this:

@Min(1L)
@Max(5L)
private Integer priority;

Ken
mexxik (9) [Avatar] Offline
#6
Re: unable to add finder for an entity
looks like no more errors now

thank you