"or" in association end point name creates additional "or" in query -------------------------------------------------------------------
Key: OCL-19 URL: http://jira.andromda.org/browse/OCL-19 Project: OCL Translation Type: Bug Components: AndroMDA Validation, AndroMDA Query Versions: 3.1M1 Environment: windows xp, jdk 1.5 Reporter: donnerwood media Assigned to: Chad Brandon Creating an OCL query constraint like: context LocaleInfo::findRightsInfoForOrganization(localeStr:String,orgId:long):LocaleInfo body : allInstances()->select(li | li.organization=orgId and (li.locale = localeStr.toLower() or li.defaultLocale = 1))->sortedBy(li.defaultLocale)->first() causes a HQL query like: /** * @see com.dm.avatar.persistance.I18N.LocaleInfo#findRightsInfoForOrganization(int, java.lang.String, long) */ public Object findRightsInfoForOrganization(final int transform, final java.lang.String localeStr, final long providerId) { return this.findRightsInfoForOrganization(transform, "from com.dm.avatar.persistance.I18N.LocaleInfo as li where or li.organization = :orgId or and (li.locale = lower(:localeStr) or li.defaultLocale = 1) order by li.defaultLocale", localeStr, providerId); } ------------------------------------------------------- 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