Skip to content

Commit

Permalink
AbstractAuditable找不到Audit时不报错
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix committed Feb 29, 2016
1 parent 8bd8bbc commit 1efe8cc
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package edu.scup.data.jpa.repository.domain;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.springframework.data.jpa.domain.AbstractPersistable;

import javax.persistence.ManyToOne;
Expand All @@ -22,9 +24,11 @@ public abstract class AbstractAuditable<U, PK extends Serializable> extends Abst
private static final long serialVersionUID = -2363991186256484787L;

@ManyToOne
@NotFound(action= NotFoundAction.IGNORE)
private U createdBy;

@ManyToOne
@NotFound(action= NotFoundAction.IGNORE)
private U lastModifiedBy;

@Temporal(TemporalType.TIMESTAMP)
Expand Down

0 comments on commit 1efe8cc

Please sign in to comment.