|
Hello Patrick, do you have any idea - why the null-values of detached objects get overwritten with the values from db when merging the objects again (the null-valued fields where non-null when detaching them and sending them to the web tier. At the web-tier they become null and are sent back - after merging via the entity-manager - the now null-valued fields are overwritten with the values from db). my persistence.xml looks like that: <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"> <persistence-unit name="lbsims" transaction-type="JTA"> <provider> org.apache.openjpa.persistence.PersistenceProviderImpl </provider> <jta-data-source>jdbc_lbsims</jta-data-source> <class>com.xxxxxxx.zzzzog</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name="openjpa.ConnectionFactoryMode" value="managed" /> <property name="openjpa.TransactionMode" value="managed"/> <property name="openjpa.Multithreaded" value="true"/> <property name="openjpa.ManagedRuntime" value="jndi(TransactionManagerName=java:comp/UserTransaction)" /> <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/> </properties> </persistence-unit> </persistence> does anyone have a tip for me? please help - i don't know how to handle that case. thanks, rené Patrick Linskey schrieb: Hi, Are you running the OpenJPA enhancer? Can you post your persistence.xml file? Were the null-valued fields non-null when you detached objects and sent them to the web tier?-Patrick On 9/14/07, rené giretzlehner <[EMAIL PROTECTED]> wrote:Hi, I'm using 0.9.7 version. My problem is that when I merge detached objects via the entity-manager - ALL NULL-values which I set in the web-tier are being replaced by the values of the object-fields which are in the database. Is this behavior intended? Because it is necessary for me the reset some fields from the db-value to NULL again. Is it possible that I have made a mistake in the jpa-configuration - is there a section in the configuration where I can tell jpa to persist the NULL-values and NOT to overwrite them with the values from db? Thanks for your suggestions! All the best, rené |
- Overwritten Null-Values @ merge rené giretzlehner
- Re: Overwritten Null-Values @ merge Patrick Linskey
- Re: Overwritten Null-Values @ merge rené giretzlehner
- Re: Overwritten Null-Values @ merge rené giretzlehner
