1
0
mirror of https://github.com/google/nomulus synced 2026-05-18 05:41:51 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Shicong Huang
1ded33ecea Resolve warnings in the Hibernate log (#542) 2020-04-03 18:04:55 -04:00
Shicong Huang
bf4659f11c Auto-apply JPA converters for map type (#520)
* Add map converter

* Delete old map usertype

* Refactor bind

* Change to use map entry

* Use Map.Entry
2020-04-03 10:47:42 -04:00
2 changed files with 3 additions and 7 deletions

View File

@@ -14,6 +14,7 @@
package google.registry.schema.tld;
import google.registry.model.ImmutableObject;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
@@ -26,7 +27,7 @@ import javax.persistence.Id;
* <p>These are not persisted directly, but rather, using {@link PremiumList#getLabelsToPrices()}.
*/
@Entity
public class PremiumEntry implements Serializable {
public class PremiumEntry extends ImmutableObject implements Serializable {
@Id
@Column(nullable = false)

View File

@@ -4,15 +4,10 @@
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm
http://xmlns.jcp.org/xml/ns/persistence/orm_2_2.xsd"
version="2.2">
<embeddable class="org.joda.money.Money" access="FIELD">
<attributes>
<embedded name="money" access="FIELD"/>
</attributes>
</embeddable>
<embeddable class="org.joda.money.Money" access="FIELD" />
<embeddable class="org.joda.money.BigMoney" access="FIELD">
<attributes>
<basic name="amount" access="FIELD"/>
<basic name="currency" access="FIELD"/>
</attributes>
</embeddable>
</entity-mappings>