You can either do a "for each", implement your own search method, override the index method of collectionbase as pass an specific object to find or do something else entirely.
If you want to avoid duplicate objects in a oneToMany association you can override the add method to scan for the same object first and throw an exception if there is a duplicate.
- Richard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
How i can find a object into collection or i have use a for each.
I want controler object duplicate in a asociation oneToMany.
Saludos
Victor
You can either do a "for each", implement your own search method, override the index method of collectionbase as pass an specific object to find or do something else entirely.
If you want to avoid duplicate objects in a oneToMany association you can override the add method to scan for the same object first and throw an exception if there is a duplicate.
- Richard.