Commit 8fab60f7 by Tuomas Riihimäki

Ohops.. Productissa price pitäisi olla varmaan BigDecimal

1 parent 1aeabaac
......@@ -6,7 +6,6 @@
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="both"/>
<property name="eclipselink.cache.type.default" value="NONE"/>
<property name="eclipselink.logging.level" value="ALL"/>
</properties>
</persistence-unit>
......
......@@ -4,6 +4,7 @@
*/
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
......@@ -44,8 +45,8 @@ public class Product implements EventChildInterface {
@Column(name = "product_name")
private String name;
@Column(name = "price", nullable = false)
private BigInteger price;
@Column(name = "price", nullable = false,precision = 24, scale = 4)
private BigDecimal price;
@Column(name = "sort", nullable = false)
private int sort;
......@@ -84,7 +85,7 @@ public class Product implements EventChildInterface {
this.id = new EventPk(event);
}
public Product(Event event, BigInteger price, int sort) {
public Product(Event event, BigDecimal price, int sort) {
this(event);
this.price = price;
this.sort = sort;
......@@ -98,11 +99,11 @@ public class Product implements EventChildInterface {
this.name = productName;
}
public BigInteger getPrice() {
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigInteger price) {
public void setPrice(BigDecimal price) {
this.price = price;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!