Sorry it looks like they are both related to not "<>" so just file one.
-----Original Message----- From: Chad Brandon [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 10:51 AM To: '[EMAIL PROTECTED]'; '[email protected]' Subject: RE: [Andromda-user] OCL/H-QL translation problems Looks like a couple of bugs, please file 2 issues in the OCL JIRA project and I�ll fix them. ________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David R. Allen Sent: Tuesday, March 08, 2005 10:47 AM To: [email protected] Subject: [Andromda-user] OCL/H-QL translation problems In my model, I am specifying the body of a finder method with an OCL expression that basically appears as follows: context PaymentTransaction::findProcessed(paymentId : String) : Collection(PaymentTransaction) body: allInstances() -> select ( txn | txn.id = paymentId and� txn.status <> com::sunrise::ecommerce::enum::TransactionStatusEnum::PENDING) The last condition in the select function is what I am changing for each test case.� I do not mind using a string value for the enumerated value, but the more pressing issue is the inequality expression not being translated correctly.� Let me know if this is a bug or if I have done something wrong in the expression.� The following are the results, each with a different problem: Case 1:� Not equals for a string value. � Resulting query:� from ...PaymentTransaction as txn where txn.id = :paymentId and txn.status < 'pend' � OCL expression:�� It had "txn.status <> 'pend'" � Problem:�������� ���The ">" symbol was removed, or just incorrectly parsed (perhaps lexical analysis problem).� This always happens with any expression containing "<>". Case 2:� Not equals for an enumerated value. � Resulting query:� None � OCL expression:�� It had "txn.status <> com::sunrise::ecommerce::enum::TransactionStatusEnum::PENDING" � Problem:�������� ����Exception is thrown for this: ------- AndroMDA Exception Recording ------- Version ........: 3.0-RC1-20050221134303 Error ..........: Error performing ModelProcessor.process with model(s) --> 'jar:file:C:\Documents and Settings\David Allen\My Documents\ReservationBusiness\PMWorkspace\PaymentServices\mda/src/uml/Paymen tSystemModel.xml.zip!/PaymentSystemModel.xml' Build ..........: 2005-02-21 13:43:03 Build System ...: Linux-2.6.8-1.521 Build JDK ......: IBM Corporation-1.4.2 Build Builder ..: amartinwest Run System .....: Windows XP5.1 Run JDK ........: Sun Microsystems Inc.1.4.2_06-b03 Main Exception .: Error performing Cartridge.processTemplateWithModelElements Root Exception .: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getQuery' in� class org.andromda.cartridges.hibernate.metafacades.HibernateFinderMethodLogicImpl threw exception class org.andromda.core.translation.TranslatorException : Error performing ExpressionTranslator.translate with translationName 'query.Hibernate-QL', contextElement 'org.andromda.metafacades.uml14.OperationFacadeLogicImpl[findProcessed]' and expression 'context PaymentTransaction::findProcessed(paymentId : String) : Collection(PaymentTransaction) body: allInstances() -> select ( txn | txn.id = paymentId and� txn.status <> com::sunrise::ecommerce::enum::TransactionStatusEnum::PENDING)' org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getQuery' in� class org.andromda.cartridges.hibernate.metafacades.HibernateFinderMethodLogicImpl threw exception class org.andromda.core.translation.TranslatorException : Error performing ExpressionTranslator.translate with translationName 'query.Hibernate-QL', contextElement 'org.andromda.metafacades.uml14.OperationFacadeLogicImpl[findProcessed]' and expression 'context PaymentTransaction::findProcessed(paymentId : String) : Collection(PaymentTransaction) body: allInstances() -> select ( txn | txn.id = paymentId and� txn.status <> com::sunrise::ecommerce::enum::TransactionStatusEnum::PENDING)' David R. Allen [EMAIL PROTECTED] � ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
