db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join
in Search
More Search Options

Browse by Tags

All Tags » Query » Constraint   (RSS)
  • Query objects that "contain" other objects only?

    consider the following case: i am storing items i1 and i2 storing a list of other items (i1 contains i11 and i12, i2 cotnains i21). i want to retrieve only those items (i1 or i2) that contain two other items (i11 and i12). the following code returns i1 if i query for items that contain i11 or i12 but not if i want to make sure that the returned ...
    Posted to db4o User Forum (Forum) by michi_das_hirn on July 22, 2008
  • SODA question - querying Lists

    Hello! Can somebody tell me how SODA behaves for querying Lists? Assumed that Foo is a class which got a field (List _bars) which holds Bar-Objects and I want to get all Foos which got a special Bar. Does this Query Query q = _objectContainer.query();q.constrain(Foo.class);q.descend(''_bars'').constrain(special_bar); // special_bar is a ...
    Posted to db4o User Forum (Forum) by Poison on April 24, 2007
  • List Sub Query

    Hi,we are new users in db4o and have the following problem using a java class construct like:class Folder {    Stirng name;    List mails;}  class Mail {    String subject;}Now we have some folders (e.g. ''inbox'', ''sent'' ...) containing mails.We are trying to search for mails with a subject ...
    Posted to db4o User Forum (Forum) by andsch on January 31, 2007
  • Query by Interface (with further constrains)

    I experience exactly the problem as described in Eric´s post from 2-04-2006... My query constrains by an interface (query.constrain(myInterface.class) - that part is working just fine giving all the objectsstored that implement that interface. But now the trouble begins:I add another constrain for a member of the classes that would be returned ...
    Posted to db4o User Forum (Forum) by wegi on October 9, 2006
  • Failed constraint on unset object?

    So, here's the code: public static IEnumerable<Alias> GetFromParent(HasAliases parent) {         Query query = _db.Query();         query.Constrain(typeof(Alias));         ...
    Posted to db4o User Forum (Forum) by zyrain on October 5, 2006
  • Summary

    Hi, Sorry for late feedback - I have been busy with other development. Just wanted to summarize: - On the original question about OR union and custom evaluators - I solved my problem by running several queries and then using collections and operating on them to make the OR or AND. Maybe not as quick and politically correct, but it gets the job ...
    Posted to db4o User Forum (Forum) by demo.bau on October 3, 2006
  • Range query for indexed field of type long broken

      Db4o does not respond correctly to a query on an index field of type long. The query in this example restricts the result set to a range of values. query.execute() delivers an empty result set if the upper limit of the range is a value which does not exist in the database. I have not investigated wether this bug also appears if ...
    Posted to db4o User Forum (Forum) by fransson on September 20, 2006
  • Re: Multiple Contraints on a Query

    The above way to set up your query is perfect. ....if you use the latest 5.7 build which is just about ready. See: http://developer.db4o.com/blogs/product_news/archive/2006/09/18/New-BTree-Field-Index-Processor.aspx   After you have had the chance to try out 5.7, please post back how the results changed. We would love to hear about it.
    Posted to db4o User Forum (Forum) by Carl Rosenberger on September 18, 2006