Possibility to return detached objects from a query?

2011-08-11 Thread Michael Pflueger
Hi, While I still wonder about why detaching my entities doesn't reduce my heap memory usage, I also wonder whether there is a possibility for a query to return detached objects in the first place? This might be quite efficient for scenarios where you need to read lots of data but not update

Re: Problems when using openjpa.MetaDataFactory Property

2011-08-11 Thread Marcel Urbanek
Hi Rick, when I use property name=openjpa.MetaDataFactory value= org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory(types=com.retail_sc.test.entity.Group;com.retail_sc.test.entity.Person;) / The same error (no registered metadata) occurs. After some investigation (looking

Re: Possibility to return detached objects from a query?

2011-08-11 Thread Rick Curtis
Michael - While I still wonder about why detaching my entities doesn't reduce my heap memory usage You didn't mention what level of code you are running on, but if it is 2.0, it might be a bug. Try setting the following property: property name=openjpa.Compatibility value=CopyOnDetach=false/

Re: Problems when using openjpa.MetaDataFactory Property

2011-08-11 Thread Michael Dick
Going back to your original email, the documentation is misleading. While you could use PersistenceMetaDataFactory you'd probably prefer to use PersistenceMappingFactory. Basically, you did the right thing by extending the PersistenceMappingFactory.. The product derivations are confusing, because

Re: Problems when using openjpa.MetaDataFactory Property

2011-08-11 Thread Marcel Urbanek
Hi, please note that my example/junit test works fine as long as I don't change the Mapping Factory properties. Only when changing the MappingFactory it goes wrong. My Group Entity looks like this: @Embeddable public class GroupPK { /*Group Number*/

Re: Problems when using openjpa.MetaDataFactory Property

2011-08-11 Thread Michael Dick
Hi Marcel, Thanks for sending the embeddable PK, I was missing that part. I see everything work if I set the MappingFactory plugin to the default value (org.apache.openjpa...) or leave the property blank. When I use a custom mapping factory I get the error where the column names aren't picked up

Re: Problems when using openjpa.MetaDataFactory Property

2011-08-11 Thread Michael Dick
Hi again, I did a little digging and I have a couple of ideas on how to fix the problem. Can you tell me what you want to do with your extension to the MappingFactory? There might be another way to get what you need to do done. Or at least a different workaround that you can use while we work on