I don’t want to save the full class so I save List with this code
connection.store(myObject.getList())
And How do I load my list?
(db.query(List) doesnt work)
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would not recommend to store plain lists. The reason is that you cannot really query for a list with certain content. You only can get all lists back with (I didn’t check if it works):
So I recommend the create a object which holds your list and query for those objects. Then it also easy to distiguish between diffrent types of list: You can create different holder classes or itroduce meta information on the holder object.
Just another detail: db4o cannot index the content of a collection. That means queries which look if a collection contains certain members will be slow.