killbill-uncached

account: remove explicit check on external key The specified

6/25/2012 9:21:48 PM

Details

diff --git a/account/src/main/java/com/ning/billing/account/dao/AuditedAccountDao.java b/account/src/main/java/com/ning/billing/account/dao/AuditedAccountDao.java
index a232732..8e162f7 100644
--- a/account/src/main/java/com/ning/billing/account/dao/AuditedAccountDao.java
+++ b/account/src/main/java/com/ning/billing/account/dao/AuditedAccountDao.java
@@ -134,11 +134,6 @@ public class AuditedAccountDao implements AccountDao {
                         throw new EntityPersistenceException(ErrorCode.ACCOUNT_DOES_NOT_EXIST_FOR_ID, accountId);
                     }
 
-                    final String currentKey = currentAccount.getExternalKey();
-                    if (!currentKey.equals(specifiedAccount.getExternalKey())) {
-                        throw new EntityPersistenceException(ErrorCode.ACCOUNT_CANNOT_CHANGE_EXTERNAL_KEY, currentKey);
-                    }
-
                     // Set unspecified (null) fields to their current values
                     final Account account = specifiedAccount.mergeWithDelegate(currentAccount);
 
diff --git a/account/src/main/resources/com/ning/billing/account/dao/AccountSqlDao.sql.stg b/account/src/main/resources/com/ning/billing/account/dao/AccountSqlDao.sql.stg
index f92db6a..dd7b8da 100644
--- a/account/src/main/resources/com/ning/billing/account/dao/AccountSqlDao.sql.stg
+++ b/account/src/main/resources/com/ning/billing/account/dao/AccountSqlDao.sql.stg
@@ -39,7 +39,7 @@ create() ::= <<
 
 update() ::= <<
     UPDATE accounts
-    SET external_key = :externalKey, email = :email, name = :name, first_name_length = :firstNameLength,
+    SET email = :email, name = :name, first_name_length = :firstNameLength,
         currency = :currency, billing_cycle_day = :billingCycleDay, payment_method_id = :paymentMethodId,
         time_zone = :timeZone, locale = :locale,
         address1 = :address1, address2 = :address2, company_name = :companyName, city = :city, state_or_province = :stateOrProvince,