Skip to content

Commit

Permalink
Set initial Version values
Browse files Browse the repository at this point in the history
  • Loading branch information
epuzanov committed Jan 29, 2024
1 parent 2e8c29d commit b864cf1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class IxModel extends BaseModel {
@Column(unique = true)
public Long id;
@Version
public Long version;
public Long version = 0L;

@ManyToOne(cascade = CascadeType.PERSIST)
@JsonView(BeanViews.Full.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class Principal extends AbstractNonAuditingGsrsEntity implements Fetchabl
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ix_core_principal_seq")
public Long id;
@Version
public Long version;
public Long version = 0L;

@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public abstract class NoIdGinasCommonData extends BaseModel implements GinasAcce


@Version
private Long internalVersion;
private Long internalVersion = 0L;



Expand Down
2 changes: 1 addition & 1 deletion gsrs-core/src/main/java/ix/utils/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public static String randvar () {

public static Object getAsNativeID(String idv){
if(idv.chars().allMatch( Character::isDigit )){
return new Long(Long.parseLong(idv));
return Long.valueOf(Long.parseLong(idv));
}else{
return idv;
}
Expand Down

0 comments on commit b864cf1

Please sign in to comment.