Linked Questions

224 votes
3 answers
223k views

I thought hibernate takes into consideration only instance variables that are annotated with @Column. But strangely today when I added a variable (that is not mapped to any column, just a variable i ...
hese's user avatar
  • 3,437
11 votes
1 answer
36k views

I am using Hibernate to map with MySQL I have an entity class in which I have the methods mapped with columns in MySQL The question is, if its possible that I do not map some of the method in that ...
junaidp's user avatar
  • 11.3k
4 votes
1 answer
3k views

I have Entity class with a helper method in it. like this.. @Entity @Table(name = "MEMBER", schema = "APP_SCHEMA") public class Member { private String id; private String externalMemberId; ...
sk_rdy's user avatar
  • 41
0 votes
1 answer
492 views

Are all instance variables in an entity class persistent in the database? Or is it possible for some variables in the entity to be non-persistent?
Sam's user avatar
  • 47
28 votes
1 answer
45k views

Currently I'm learning the Spring framework, mainly focusing on it's Security Module. I've watched some guides in connection with registration and login. I saw this common usage of transient keyword ...
F3R1's user avatar
  • 503
6 votes
3 answers
6k views

I am trying to use javax.persistence.* to auto create Table by uesing @Entity. Here is some problem. Is there anyway to convert the JsonNode to String By use Annotation. edit: the Jpa is Spring-Data-...
Jary zhen's user avatar
  • 447
5 votes
1 answer
2k views

My question is, can i use a static logger in a JPA Entity, or will it cause some problem? I would like to do something like this (the logger is log4j): @Entity public class AlertRule implements ...
Kari5's user avatar
  • 188
0 votes
1 answer
1k views

One Group has many Users: Group import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonManagedReference; import javax.persistence.*; import java.util....
George Pligoropoulos's user avatar
2 votes
0 answers
1k views

I have created a modal in the spring boot application where that modal is an entity. But I want to exclude one field from creating a column from that modal. For instance, below given is my fields in ...
Sahal's user avatar
  • 31
0 votes
1 answer
985 views

I am trying to save a byte[] field to local filesystem instead of the database. I have tried the JPA annotation @Transient @Entity @Table(name = "screenshot") @Cache(usage = CacheConcurrencyStrategy....
Gavin's user avatar
  • 2,844
2 votes
1 answer
491 views

I am fairly new to Spring and Hibernate. I'm creating an app to learn them. What I want to do is post a message with a timestamp. So far I was trying to have PostgreSQL take care of the TIMESTAMPTZ ...
saguaro smart's user avatar
0 votes
1 answer
531 views

I want to set values from an dto object and insert them in database with save jpa repository methode can i insert a default value if attributes is not valid(null or size is to longer) using jpa ? dto ...
Anass EL's user avatar