I have strange situation when using big long values. I use JPA data source with following ds.xml file:
Java class is simple:
As you can see I am using integer type in DataSource for mapping Long java type (as suggested in docs/forum).
I have simple ListGrid which displays values from this DataSource. However, when displaying large values in ID column I am getting strage results, like some kind of rounding happens behind the scene. For example for record with ID=170005001048600028 list grid displays 170005001048600030 or 105000000000110990 instead of 105000000000110997. It seems that last two digits are always displayed incorrectly.
What is the problem here? I am using SmartGWT Power 3.0p (few weeks old build)
Code:
<!-- <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -->
<DataSource xmlns:fmt="urn:jsptld:http://java.sun.com/jsp/jstl/fmt"
ID="client"
serverConstructor="com.isomorphic.jpa.JPA2DataSource"
autoDeriveSchema="true"
schemaBean="net.esteh.esdoc.domain.Client">
<fields>
<field name="id" title="ID" primaryKey="true" type="integer"/>
<filed name="name" type="text" />
<filed name="address" type="text" />
<field name="city" type="city" />
...
</fields>
</DataSource>
Code:
@Id
@Column(name="id")
private Long id;
@Column(name="name", columnDefinition="nvarchar(255)")
private String name;
@Column(name="address")
private String address;
@Column(name="city")
private String city;
...
I have simple ListGrid which displays values from this DataSource. However, when displaying large values in ID column I am getting strage results, like some kind of rounding happens behind the scene. For example for record with ID=170005001048600028 list grid displays 170005001048600030 or 105000000000110990 instead of 105000000000110997. It seems that last two digits are always displayed incorrectly.
What is the problem here? I am using SmartGWT Power 3.0p (few weeks old build)