#Spring

1 messages · Page 1 of 1 (latest)

errant cloak
#

why i am getting this error can someone help me

worldly tendonBOT
#

<@&1004656351647117403> please have a look, thanks.

errant cloak
#

package com.gallery.gallery.model;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@MappedSuperclass
public class BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "creation_time")
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private Date creationTime;

@Column(name = "update_time")
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private Date updateTime;

}

#

my BaseEntity class

hollow herald
#

looks like basic attribute types shouldn't be containers

errant cloak
#

when i dont use super class and add id in user class it works

hallow palm
#

i think putting @Transient above the method might solve your issue too

errant cloak
#

When I don’t extend baseentitity class there is no error

hallow palm
vapid crater
#

as i don't directly implemet the UserDetails inside a main Entity class