This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/causeway-app-petclinic.git

commit f6fc7b0873eebd50cc1693c52885cabe22c3c3f9
Author: Dan Haywood <[email protected]>
AuthorDate: Sat May 25 16:12:21 2024 +0100

    Updates PetOwner#emailAddress to use new value type
    
    ... adds necessary JPA annotation
---
 .../main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
 
b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
index 4cbe325..be038c6 100644
--- 
a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
+++ 
b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
@@ -65,6 +65,8 @@ import domainapp.modules.petowner.types.Notes;
 
 import domainapp.modules.petowner.types.PhoneNumber;
 
+import domainapp.modules.petowner.value.EmailAddress;
+
 import lombok.AccessLevel;
 import lombok.Getter;
 import lombok.NoArgsConstructor;
@@ -147,11 +149,11 @@ public class PetOwner implements Comparable<PetOwner>, 
CalendarEventable {
     @PropertyLayout(fieldSetId = "contact", sequence = "1.1")
     private String telephoneNumber;
 
-    @Column(length = 40, nullable = true, name = "emailAddress")
+    @javax.persistence.Embedded()
     @Getter @Setter
     @Property(editing = Editing.ENABLED)
     @PropertyLayout(fieldSetId = "contact", sequence = "1.2")
-    private String emailAddress;
+    private EmailAddress emailAddress;
 
     @Notes
     @Column(length = Notes.MAX_LEN, nullable = true)

Reply via email to