details:   /erp/devel/pi/rev/d0fe886ea0dd
changeset: 11083:d0fe886ea0dd
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Mar 08 11:07:40 2011 +0100
summary:   Fix ad_db_modified function so that it doesn't always fail.

details:   /erp/devel/pi/rev/25740f5d26f9
changeset: 11084:25740f5d26f9
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Mar 08 12:48:37 2011 +0100
summary:   Removed separate doPost call in callout execution as it was 
duplicated (service already calls it).

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
 |  7 +------
 src-db/database/model/prescript-PostgreSql.sql                                 
                                       |  6 +++---
 2 files changed, 4 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r a1a779920af6 -r 25740f5d26f9 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Tue Mar 08 12:16:58 2011 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Tue Mar 08 12:48:37 2011 +0100
@@ -774,13 +774,9 @@
         calloutsToCall.remove(calloutClassName);
         lastfieldChangedList.remove(lastFieldChanged);
         Object calloutInstance = calloutClass.newInstance();
-        Method method = null;
         Method init = null;
         Method service = null;
         for (Method m : calloutClass.getMethods()) {
-          if (m.getName().equals("doPost")) {
-            method = m;
-          }
           if (m.getName().equals("init") && m.getParameterTypes().length == 1) 
{
             init = m;
           }
@@ -789,7 +785,7 @@
           }
         }
 
-        if (method == null || init == null || service == null) {
+        if (init == null || service == null) {
           log.info("Couldn't find method in Callout " + calloutClassName);
         } else {
           RequestContext rq = RequestContext.get();
@@ -804,7 +800,6 @@
           CalloutHttpServletResponse fakeResponse = new 
CalloutHttpServletResponse(rq.getResponse());
           Object[] arguments = { rq.getRequest(), fakeResponse };
           service.invoke(calloutInstance, arguments);
-          method.invoke(calloutInstance, arguments);
           String calloutResponse = fakeResponse.getOutputFromWriter();
 
           // Now we parse the callout response and modify the stored values of 
the columns modified
diff -r a1a779920af6 -r 25740f5d26f9 
src-db/database/model/prescript-PostgreSql.sql
--- a/src-db/database/model/prescript-PostgreSql.sql    Tue Mar 08 12:16:58 
2011 +0100
+++ b/src-db/database/model/prescript-PostgreSql.sql    Tue Mar 08 12:48:37 
2011 +0100
@@ -1395,7 +1395,7 @@
   v_md5 = ''; 
   --Checksum for PL functions
   for i in (
-       select upper(proname) as proname, p.proname as realname, pronargs, 
oidvectortypes(p.proargtypes)
+       select upper(proname) as proname, p.proname as realname, pronargs, 
oidvectortypes(p.proargtypes) as proargtypes
        from pg_proc p, pg_namespace n 
          where  pronamespace = n.oid   and n.nspname=current_schema() 
          and p.oid not in (select tgfoid   from pg_trigger) 
@@ -1413,7 +1413,7 @@
        from pg_proc p
       where p.proname = i.realname
         and p.pronargs = i.pronargs
-        and p.proargtypes = i.proargtypes;
+        and oidvectortypes(p.proargtypes) = i.proargtypes;
         
       v_md5 := md5(v_md5||aux);
 
@@ -1431,7 +1431,7 @@
             AND pg_catalog.pg_function_is_visible(pg_proc.oid)
             AND pg_proc.proname = i.realname
              and pg_proc.pronargs = i.pronargs
-             and pg_proc.proargtypes = i.proargtypes
+             and oidvectortypes(pg_proc.proargtypes) = i.proargtypes
             and (pg_proc.proargmodes is not null
             or pg_proc.proargnames is not null)
                 ORDER BY 1,2;

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to