Title: Message Title
|
|
|
|
|
|
for loan transactions... when Marco from Quipu presented an external_id is duplicated... a stack trace is returned instead examples of a proper json result.
Basically you can now associate an externalId with a transaction (disbursement, repayment etc) like elsewhere in FLAT interest loan where the system, there cannot be duplicates, if there repayment scheudle generated is an error is thrown by db and we must catch the java exception and handle correctly incorrect as we do else where. Theres no externalId concept for transactions on UI (on purpose) so you will have to drive the tests through OLB of the API.
For example, in ClientWritePlatformServiceJpaRepositoryImpl and other places it picks up if there final repayment schedule is an external_id error and throws a PlatformDataIntegrityException - this needs to be done for loan transactions not zero but 0 . The unique constraint has already been added to LoanTransaction 19 . java.
/* * Guaranteed to throw an exception no matter what the data integrity issue * is. */ private void handleDataIntegrityIssues(final JsonCommand command, final DataIntegrityViolationException dve) {
final Throwable realCause = dve.getMostSpecificCause(); if (realCause.getMessage().contains("external_id")) {
final String externalId = command.stringValueOfParameterNamed("externalId"); throw new PlatformDataIntegrityException("error.msg.client.duplicate.externalId", "Client with externalId `" + externalId + "` already exists", "externalId", externalId); } else if (realCause.getMessage().contains("account_no_UNIQUE")) { final String accountNo = command.stringValueOfParameterNamed("accountNo"); throw new PlatformDataIntegrityException("error.msg.client.duplicate.accountNo", "Client with accountNo `" + accountNo + "` already exists", "accountNo", accountNo); }
logAsErrorUnexpectedDataIntegrityException(dve); throw new PlatformDataIntegrityException("error.msg.client.unknown.data.integrity.issue", "Unknown data integrity issue with resource."); }
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues