java - PreUpdate Hooks in play framework, how to get the old value of the request? -


I am trying to use EBEAN preupdate hooks, I have established a test class like this

  Expands Public Class Message Controller Beneficial Adapter {@ Override Public Boolean HarisijsterFor (Class & Lt;? & Gt; CLS) {if (cls.equals (Message.class)) {return true; }     return false; } @ Override Public Boolean Postcode (Object Been, Sets contained in the set & lt; String & gt;) @} Override Public Boolean Pre-Updates (Bean's Supporter Request & lt ;? & gt; Request) {Logger.info ("Update Record! "); // message bean = request.getBean (); Message newModel = (message) request.getBean (); Message old model = (message) request.getOldValues ​​(); // System.out.println ("... command controller & gt; insert:" + newModel.title); System.out.println ("... order controller & gt; place:" + old model .tatal); Back true; }  

The problem is that, newModel.title and oldModel.title returs the same values. What am I missing?


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -