Skip to content

Commit

Permalink
Remove warning message when you use save() instead of create()
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebort committed Apr 3, 2011
1 parent b77b0f9 commit 8a0d412
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions framework/src/play/db/jpa/GenericModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ public boolean validateAndCreate() {
* store (ie insert) the entity.
*/
public <T extends JPABase> T save() {
if (!em().contains(this) && Play.mode.isDev()) {
StackTraceElement[] callStack = Thread.currentThread().getStackTrace();
StackTraceElement caller = callStack[2];
Logger.warn("save() has been called to persist a new JPA instance at %s line %s, use create() instead.", caller.getFileName(), caller.getLineNumber());
}
_save();
return (T) this;
}
Expand Down

0 comments on commit 8a0d412

Please sign in to comment.