Let's say I have a mongodb document with a _id java object inside, for some reason you need to use the mongodbupdate function rather than mongodbsave, so you need to remove the _id from the document and place it in the query structure... and then you get hit by the by reference nature of java/openbd.
- You can't set it to some variable and next remove it from the original struct, as that will remove it from the variable as well. - You can't make a duplicate of the objectId object, as java objects can be duplicated. - You can't clone it, as the object has no clone function. - The only solution (currently in use) is to .toString() it and next make an entirely new object passing the string to it's constructor (bleh). So I was wondering, isn't there a better way? In this case making the duplicate doesn't cost *that *much, but it still feels wrong. And assuming there isn't a better way, wouldn't it be good then to have a StructExtract function (or similar) which takes the item out of the original struct (or have structDelete return the object if the third argument is "extract"). Well, might be there's a cleaner solution, but I don't see it at least. Greetings, David -- -- online documentation: http://openbd.org/manual/ http://groups.google.com/group/openbd?hl=en --- You received this message because you are subscribed to the Google Groups "Open BlueDragon" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
