translate ocl not equals (<>) to hql wrong
------------------------------------------

         Key: OCL-17
         URL: http://jira.andromda.org/browse/OCL-17
     Project: OCL Translation
        Type: Bug
 Environment: magic draw 9.5, andromda 3.2-snapshot
    Reporter: Wenhu Guan
 Assigned to: Chad Brandon 


when model a query method, add a not equals constraint,like:
 context com::softwaredecision::crm::account::Account::findAllWithException( 
accountId:Long) : Collection(Account) body findAllWithExceptionBody : 
allInstances() -> select (account |account.id <> accountId ) 

the ocl translated as:
public java.util.Collection findAllWithException(final int transform, final 
java.lang.Long accountId)
{
return this.findAllWithException(transform, "from 
com.softwaredecision.crm.account.Account as account where account.id not 
:accountId", accountId);
} 

which is wrong,should be translated to in my opinion:
public java.util.Collection findAllWithException(final int transform, final 
java.lang.Long accountId)
{
return this.findAllWithException(transform, "from 
com.softwaredecision.crm.account.Account as account where account.id <> 
:accountId", accountId);
} 





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Reply via email to