Bug 114124

Summary: Persistence should allow '<propname> in :list' to accept an array of values
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel BerrangĂ© <berrange>
Component: persistenceAssignee: ccm-bugs-list
Status: CLOSED WONTFIX QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-02 17:31:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Berrangé 2004-01-22 20:08:04 UTC
Description of problem:
BigDecimal[] srcIDs = ...

DomainCollection terms = domain.getTerms();
terms.addEqualsFilter("model.related.link.relationType", "related");
terms.addFilter("model.related.id in :ids").set("ids", srcIDs);


When this runs it dies with

com.arsdigita.util.WrappedError: SQL error binding [3] to
[Ljava.math.BigDecimal;@53be3972
(root cause: The table for [Ljava.math.BigDecimal; is not in the database.
Contact the DBA, as the database is in an inconsistent state.)
	at
com.redhat.persistence.engine.rdbms.SQLWriter.bind(SQLWriter.java(Compiled
Code))
	at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:481)
	at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:430)
	at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:261)
	at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:252)
	at com.redhat.persistence.Cursor.execute(Cursor.java(Inlined Compiled
Code))
	at com.redhat.persistence.Cursor.next(Cursor.java(Compiled Code))
	at
com.arsdigita.persistence.DataQueryImpl.next(DataQueryImpl.java(Compiled
Code))
	at com.arsdigita.domain.DomainQuery.next(DomainQuery.java(Compiled Code))
	at
com.arsdigita.aplaws.ui.ItemCategoryPicker.getRelatedTerms(ItemCategoryPicker.java:126)


So instead I have to stuff the elements in the BigDecimal[] into an
ArrayList and pass that it

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
Exception thrown

Expected results:
Query runs as expected

Additional info:

Comment 1 Daniel Berrangé 2006-09-02 17:31:50 UTC
Closing old tickets