Hi,
please have a look at
http://db.apache.org/ojb/docu/guides/repository.html#collection-descriptor-N10611 http://db.apache.org/ojb/docu/guides/advanced-technique.html#manageable-collection
should work
<collection-descriptor name="objeIndiVOs" element-class-ref=" com.steria.tc.vo.ObjeIndiVO" orderby="codindi" sort="ASC" auto-retrieve=" false" auto-update="true" auto-delete="object" collection-class=" org.apache.ojb.broker.util.collections.ManageableVector">
regards, Armin
Alessandro Colantoni wrote:
Hi!
in a method I have the line of code:
broker.retrieveReference(objetivoVO ,"objeIndiVOs");
In objetivoVO I have :
private Vector objeIndiVOs;
with relative setter and getter.
In the class descriptor of objetivoVO I have
<collection-descriptor name="objeIndiVOs" element-class-ref="
com.steria.tc.vo.ObjeIndiVO" orderby="codindi" sort="ASC" auto-retrieve="
false" auto-update="true" auto-delete="object" collection-class="
java.util.Vector">
<inverse-foreignkey field-ref="codobje"/>
</collection-descriptor>
When I try to retrieve the reference I get a cast Exception.
If I delete the collection-class attribute it works fine.
But I need it because in an other part of the application I need to Know the type of the collection, and if i don't put it i get a null when i do collectionDescriptor.getCollectionClass();
Why I get the exception?
Or How can I get the collection type in an alternative way from the repository?
thanks for help
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
