Bug 64 : version counter of type long results in ClassCastException
Priority 
High
Reported Version 
 
Logged By 
imario
Status 
Fixed
Fixed Version 
1.0.3
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
14/02/2009
Updated 
14/02/2009
Type 
Bug
 
Attachments 
No attachments

... due to the fact that the CounterFactory uses for "long" types the GeneratedCounterInteger class.

Patch:

Index: ../ebean/src/com/avaje/ebean/server/deploy/generatedproperty/CounterFactory.java
===================================================================
--- ../ebean/src/com/avaje/ebean/server/deploy/generatedproperty/CounterFactory.java (revision 127)
+++ ../ebean/src/com/avaje/ebean/server/deploy/generatedproperty/CounterFactory.java Sat Feb 14 12:54:09 CET 2009
@@ -38,7 +38,7 @@

final GeneratedCounterInteger integerCounter = new GeneratedCounterInteger();

- final GeneratedCounterInteger longCounter = new GeneratedCounterInteger();
+ final GeneratedCounterLong longCounter = new GeneratedCounterLong();

/**
* Create the GeneratedProperty based on the property type.

 
Rob 16 Feb 07:28
Fixed in v1.0.3

Good stuff. fixed in v1.03.

woResponse

Upload a file