Поле JPA OneToOne «price_id_price_id» не имеет значения по умолчанию.JAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Поле JPA OneToOne «price_id_price_id» не имеет значения по умолчанию.

Сообщение Anonymous »

how do I resolve that error? Thank to all answers.

org.springframework.orm.jpa.JpaSystemException: could not execute
statement [Field 'price_id_price_id' doesn't have a default value]
[insert into servicecontractpriceentity
(confirmed,creation_date,user_id_user_id) values (?,?,?)] at
org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:348)
~[spring-orm-6.2.9.jar:6.2.9] at
org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:256)
~[spring-orm-6.2.9.jar:6.2.9] at
org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:241)
~[spring-orm-6.2.9.jar:6.2.9] at
org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:566)
~[spring-orm-6.2.9.jar:6.2.9] at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:795)
~[spring-tx-6.2.9.jar:6.2.9] at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:758)
~[spring-tx-6.2.9.jar:6.2.9] at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:698)
~[spring-tx-6.2.9.jar:6.2.9] at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:416)
~[spring-tx-6.2.9.jar:6.2.9] at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
~[spring-tx-6.2.9.jar:6.2.9] at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
~[spring-aop-6.2.9.jar:6.2.9] at
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:728)
~[spring-aop-6.2.9.jar:6.2.9] at
edu.remad.tutoring3.services.impl.ServiceContractPriceEntityServiceimpl$$SpringCGLIB$$0.saveServiceContractPrice()
~[classes/:0.1.1-SNAPSHOT] at
edu.remad.tutoring3.controllers.ApiServiceContractPriceEntityController.saveServieContractPrice(ApiServiceContractPriceEntityController.java:79)
~[classes/:0.1.1-SNAPSHOT] at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) ~[na:na] at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
~[na:na] at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:na] at
java.base/java.lang.reflect.Method.invoke(Method.java:568) ~ [ n a : n a ] < b r / > a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . d o I n v o k e ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 2 5 8 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . i n v o k e F o r R e q u e s t ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 1 9 1 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . i n v o k e A n d H a n d l e ( S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . j a v a : 1 1 8 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . i n v o k e H a n d l e r M e t h o d ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 9 9 1 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . h a n d l e I n t e r n a l ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 8 9 6 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . A b s t r a c t H a n d l e r M e t h o d A d a p t e r . h a n d l e ( A b s t r a c t H a n d l e r M e t h o d A d a p t e r . j a v a : 8 7 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . D i s p a t c h e r S e r v l e t . d o D i s p a t c h ( D i s p a t c h e r S e r v l e t . j a v a : 1 0 8 9 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . D i s p a t c h e r S e r v l e t . d o S e r v i c e ( D i s p a t c h e r S e r v l e t . j a v a : 9 7 9 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . p r o c e s s R e q u e s t ( F r a m e w o r k S e r v l e t . j a v a : 1 0 1 4 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . d o P o s t ( F r a m e w o r k S e r v l e t . j a v a : 9 1 4 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > j a k a r t a . s e r v l e t . h t t p . H t t p S e r v l e t . s e r v i c e ( H t t p S e r v l e t . j a v a : 5 9 0 ) < b r / > ~ [ s e r v l e t - a p i . j a r : 6 . 0 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . s e r v i c e ( F r a m e w o r k S e r v l e t . j a v a : 8 8 5 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > j a k a r t a . s e r v l e t . h t t p . H t t p S e r v l e t . s e r v i c e ( H t t p S e r v l e t . j a v a : 6 5 8 ) < b r / > ~ [ s e r v l e t - a p i . j a r : 6 . 0 ] a t < b r / > o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a l D o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 2 0 5 ) < b r / > ~ [ c a t a l i n a . j a r : 1 0 . 1 . 1 9 ] a t < b r / > o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . d o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 4 9 ) < b r / > ~ [ c a t a l i n a . j a r : 1 0 . 1 . 1 9 ] a t < b r / > o r g . a p a c h e . t o m c a t . w e b s o c k e t . s e r v e r . W s F i l t e r . d o F i l t e r ( W s F i l t e r . j a v a : 5 1 ) < b r / > ~ [ t o m c a t - w e b s o c k e t . j a r : 1 0 . 1 . 1 9 ] a t < b r / > o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a l D o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 7 4 ) < b r / > ~ [ c a t a l i n a . j a r : 1 0 . 1 . 1 9 ] a t < b r / > o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . d o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 4 9 ) < b r / > ~ [ c a t a l i n a . j a r : 1 0 . 1 . 1 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 0 8 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 0 8 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y . l a m b d a $ d o F i l t e r I n t e r n a l $ 3 ( F i l t e r C h a i n P r o x y . j a v a : 2 3 1 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 6 5 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a c c e s s . i n t e r c e p t . A u t h o r i z a t i o n F i l t e r . d o F i l t e r ( A u t h o r i z a t i o n F i l t e r . j a v a : 1 0 1 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a c c e s s . E x c e p t i o n T r a n s l a t i o n F i l t e r . d o F i l t e r ( E x c e p t i o n T r a n s l a t i o n F i l t e r . j a v a : 1 2 5 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a c c e s s . E x c e p t i o n T r a n s l a t i o n F i l t e r . d o F i l t e r ( E x c e p t i o n T r a n s l a t i o n F i l t e r . j a v a : 1 1 9 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e s s i o n . S e s s i o n M a n a g e m e n t F i l t e r . d o F i l t e r ( S e s s i o n M a n a g e m e n t F i l t e r . j a v a : 1 3 1 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e s s i o n . S e s s i o n M a n a g e m e n t F i l t e r . d o F i l t e r ( S e s s i o n M a n a g e m e n t F i l t e r . j a v a : 8 5 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a u t h e n t i c a t i o n . A n o n y m o u s A u t h e n t i c a t i o n F i l t e r . d o F i l t e r ( A n o n y m o u s A u t h e n t i c a t i o n F i l t e r . j a v a : 1 0 0 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e r v l e t a p i . S e c u r i t y C o n t e x t H o l d e r A w a r e R e q u e s t F i l t e r . d o F i l t e r ( S e c u r i t y C o n t e x t H o l d e r A w a r e R e q u e s t F i l t e r . j a v a : 1 7 9 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s a v e d r e q u e s t . R e q u e s t C a c h e A w a r e F i l t e r . d o F i l t e r ( R e q u e s t C a c h e A w a r e F i l t e r . j a v a : 6 3 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a u t h e n t i c a t i o n . A u t h e n t i c a t i o n F i l t e r . d o F i l t e r I n t e r n a l ( A u t h e n t i c a t i o n F i l t e r . j a v a : 1 7 7 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . o a u t h 2 . s e r v e r . r e s o u r c e . w e b . a u t h e n t i c a t i o n . B e a r e r T o k e n A u t h e n t i c a t i o n F i l t e r . d o F i l t e r I n t e r n a l ( B e a r e r T o k e n A u t h e n t i c a t i o n F i l t e r . j a v a : 1 5 8 ) < b r / > ~ [ s p r i n g - s e c u r i t y - o a u t h 2 - r e s o u r c e - s e r v e r - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a u t h e n t i c a t i o n . l o g o u t . L o g o u t F i l t e r . d o F i l t e r ( L o g o u t F i l t e r . j a v a : 1 0 7 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a u t h e n t i c a t i o n . l o g o u t . L o g o u t F i l t e r . d o F i l t e r ( L o g o u t F i l t e r . j a v a : 9 3 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o r s F i l t e r . d o F i l t e r I n t e r n a l ( C o r s F i l t e r . j a v a : 9 1 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . h e a d e r . H e a d e r W r i t e r F i l t e r . d o H e a d e r s A f t e r ( H e a d e r W r i t e r F i l t e r . j a v a : 9 0 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . h e a d e r . H e a d e r W r i t e r F i l t e r . d o F i l t e r I n t e r n a l ( H e a d e r W r i t e r F i l t e r . j a v a : 7 5 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . c o n t e x t . S e c u r i t y C o n t e x t H o l d e r F i l t e r . d o F i l t e r ( S e c u r i t y C o n t e x t H o l d e r F i l t e r . j a v a : 8 2 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . c o n t e x t . S e c u r i t y C o n t e x t H o l d e r F i l t e r . d o F i l t e r ( S e c u r i t y C o n t e x t H o l d e r F i l t e r . j a v a : 6 9 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . c o n t e x t . r e q u e s t . a s y n c . W e b A s y n c M a n a g e r I n t e g r a t i o n F i l t e r . d o F i l t e r I n t e r n a l ( W e b A s y n c M a n a g e r I n t e g r a t i o n F i l t e r . j a v a : 6 2 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e s s i o n . D i s a b l e E n c o d e U r l F i l t e r . d o F i l t e r I n t e r n a l ( D i s a b l e E n c o d e U r l F i l t e r . j a v a : 4 2 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y . d o F i l t e r I n t e r n a l ( F i l t e r C h a i n P r o x y . j a v a : 2 3 3 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 1 9 1 ) < b r / > ~ [ s p r i n g - s e c u r i t y - w e b - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 1 3 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . S e r v l e t R e q u e s t P a t h F i l t e r . d o F i l t e r ( S e r v l e t R e q u e s t P a t h F i l t e r . j a v a : 5 2 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 1 3 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 7 4 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . c o n f i g . a n n o t a t i o n . w e b . c o n f i g u r a t i o n . W e b S e c u r i t y C o n f i g u r a t i o n $ C o m p o s i t e F i l t e r C h a i n P r o x y . d o F i l t e r ( W e b S e c u r i t y C o n f i g u r a t i o n . j a v a : 3 1 9 ) < b r / > ~ [ s p r i n g - s e c u r i t y - c o n f i g - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 1 3 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . h a n d l e r . H a n d l e r M a p p i n g I n t r o s p e c t o r . l a m b d a $ c r e a t e C a c h e F i l t e r $ 4 ( H a n d l e r M a p p i n g I n t r o s p e c t o r . j a v a : 2 6 7 ) < b r / > ~ [ s p r i n g - w e b m v c - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 1 3 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 7 4 ) < b r / > ~ [ s p r i n g - w e b - 6 . 2 . 9 . j a r : 6 . 2 . 9 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . s e c u r i t y . c o n f i g . a n n o t a t i o n . w e b . c o n f i g u r a t i o n . W e b M v c S e c u r i t y C o n f i g u r a t i o n $ C o m p o s i t e F i l t e r C h a i n P r o x y . d o F i l t e r ( W e b M v c S e c u r i t y C o n f i g u r a t i o n . j a v a : 2 4 0 ) < b r / > ~ [ s p r i n g - s e c u r i t y - c o n f i g - 6 . 5 . 2 . j a r : 6 . 5 . 2 ] a t < b r / > o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . D e l e g a t i n g F i l t e r P r o x y . i n v o k e D e l e g a t e ( D e l e g a t i n g F i l t e rProxy.java:362)
~[spring-web-6.2.9.jar:6.2.9] at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
~[spring-web-6.2.9.jar:6.2.9] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
~[catalina.jar:10.1.19] at
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
~[spring-web-6.2.9.jar:6.2.9] at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
~[spring-web-6.2.9.jar:6.2.9] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
~[catalina.jar:10.1.19] at
org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
~[spring-web-6.2.9.jar:6.2.9] at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
~[spring-web-6.2.9.jar:6.2.9] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
~[catalina.jar:10.1.19] at
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:124)
~[spring-boot-3.5.4.jar:3.5.4] at
org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:99)
~[spring-boot-3.5.4.jar:3.5.4] at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
~[spring-web-6.2.9.jar:6.2.9] at
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:117)
~[spring-boot-3.5.4.jar:3.5.4] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
~[catalina.jar:10.1.19] at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
~[spring-web-6.2.9.jar:6.2.9] at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
~[spring-web-6.2.9.jar:6.2.9] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
~[catalina.jar:10.1.19] at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
~[catalina.jar:10.1.19] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
~[catalina.jar:10.1.19] at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
~[catalina.jar:10.1.19] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
~[catalina.jar:10.1.19] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
~[catalina.jar:10.1.19] at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
~[tomcat-coyote.jar:10.1.19] at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
~[tomcat-coyote.jar:10.1.19] at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
~[tomcat-coyote.jar:10.1.19] at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
~[tomcat-coyote.jar:10.1.19] at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
~[tomcat-coyote.jar:10.1.19] at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
~[tomcat-util.jar:10.1.19] at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
~[tomcat-util.jar:10.1.19] at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
~[tomcat-util.jar:10.1.19] at
java.base/java.lang.Thread.run(Thread.java:840) ~[na:na] Caused by:
org.hibernate.exception.GenericJDBCException: could not execute
statement [Field 'price_id_price_id' doesn't have a default value]
[insert into servicecontractpriceentity
(confirmed,creation_date,user_id_user_id) values (?,?,?)] at
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:63)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.performNonBatchedMutation(AbstractMutationExecutor.java:134)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.jdbc.mutation.internal.MutationExecutorSingleNonBatched.performNonBatchedOperations(MutationExecutorSingleNonBatched.java:55)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.execute(AbstractMutationExecutor.java:55)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.doStaticInserts(InsertCoordinatorStandard.java:194)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.coordinateInsert(InsertCoordinatorStandard.java:132)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.insert(InsertCoordinatorStandard.java:104)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:110)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:644)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:511)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:414)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:41)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1429)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:491)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:2354)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:1978)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:439)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:169)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:267)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] at
org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:562)
~[spring-orm-6.2.9.jar:6.2.9] ... 125 common frames omitted Caused
by: java.sql.SQLException: Field 'price_id_price_id' doesn't have a
default value at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121)
~[mysql-connector-j-9.4.0.jar:9.4.0] at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)
~[mysql-connector-j-9.4.0.jar:9.4.0] at
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:988)
~[mysql-connector-j-9.4.0.jar:9.4.0] at
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1166)
~[mysql-connector-j-9.4.0.jar:9.4.0] at
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1101)
~[mysql-connector-j-9.4.0.jar:9.4.0] at
com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1448)
~[mysql-connector-j-9.4.0.jar:9.4.0] at
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1084)
~[mysql-connector-j-9.4.0.jar:9.4.0] at
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
~[HikariCP-6.3.1.jar:na] at
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
~[HikariCP-6.3.1.jar:na] at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:194)
~[hibernate-core-6.6.22.Final.jar:6.6.22.Final] ... 146 common frames
omitted

I followed that pages:
https://jakarta.ee/specifications/persi ... e/onetoone
https://vladmihalcea.com/the-best-way-t ... hibernate/
JPA Field doesn't have a default value, one to one relation
That is the entity with error:
@Entity
@Table(name = "service_contract_price_entity")
@NoArgsConstructor
@AllArgsConstructor
@Setter
@Getter
@Builder
public class ServiceContractPriceEntity {

/**
* service contract price as primary key
*/
@Id
private long id;

@OneToOne(fetch = FetchType.LAZY)
@MapsId
private UserEntity userId;

@OneToOne(fetch = FetchType.LAZY)
@MapsId
private ServiceContractEntity serviceContractId;

@OneToOne(fetch = FetchType.LAZY)
@MapsId
private PriceEntity priceId;

private boolean confirmed;

@NotNull
@Column(name = "creation_date", columnDefinition = "TIMESTAMP")
private LocalDateTime creationDate;

}

ServiceContractEntity:
@Entity
@Table(name = "service_contract_entity")
@NoArgsConstructor
@AllArgsConstructor
@Setter
@Getter
@Builder
public class ServiceContractEntity {

/**
* Constructor
*
* @param serviceContract {@link serviceContract}
*/
public ServiceContractEntity(ServiceContractDto serviceContract) {
setServiceContractNo(serviceContract.getServiceContractNo());
setServiceContractName(serviceContract.getServiceContractName());
setServiceContractDescription(serviceContract.getServiceContractDescription());
}

/**
* service contract number as primary key
*/
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "service_contract_no")
private long serviceContractNo;

/**
* name of service contract
*/
private String serviceContractName;

/**
* description of service contract
*/
private String serviceContractDescription;

/**
* creation date of service contract
*/
@Column(name = "creation_date", columnDefinition = "TIMESTAMP")
private LocalDateTime serviceContractCreationDate;

}

PriceEntity:
@Entity
@Table(name = "price_entity")
@NoArgsConstructor
@AllArgsConstructor
@Setter
@Getter
@EqualsAndHashCode
@Builder
public class PriceEntity {

/**
* Constructor
*
* @param price {@link PriceDto}
*/
public PriceEntity(PriceDto price) {
setId(price.getId());
setPrice(new BigDecimal(price.getPrice()));
setCurrency(price.getCurrency());
}

/**
* the primary key for a price
*/
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "price_id", unique = true)
private long id;

/** price with precision 16 and scale 2*/
@Column(precision = 16, scale = 2)
private BigDecimal price;

/** currency */
private String currency;

@NotNull
@Column(name = "creation_date", columnDefinition = "TIMESTAMP")
private LocalDateTime creationDate;
}


Подробнее здесь: https://stackoverflow.com/questions/798 ... ault-value
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»