Interface and @key in declare
by Findulas
Hello,
I want to declare a new fact base on an interface, f.e.: (i leave away all
those publics)
interface BoInterface {
int getId();
void setId(int id);
}
when i declare the fact
declare BoFact (
bo : BoInterface @key
)
the system throws an exception the a class is expected but an interface is
found, when trying to
perform the equals method.
Is there a restriction that @key cannot be used in a declare?
Greetings,
Bernd
--
View this message in context: http://drools.46999.n3.nabble.com/Interface-and-key-in-declare-tp3868085p...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years
ClassCastException when comparing date type with literal
by Zeke
Hi, guys:
I meet a strange issue and need your help again... I am using Drools
4.0.7.
When my rule condition is as *Message( date > "Mar-01-2012" )*,
everything is OK. But if I change it to be as below:
*$msg : Message()
Order ( $msg.date > "Mar-01-2012" )*
I will meet "java.lang.String cannot be cast to java.util.Date"
ClassCastException. "Order" is another fact. I attach the exception call
stack. Please check it. It looks like a bug to me. Do we fix it in later
release? If so, can you tell me which release contains the fix? Thanks!
14 years