persistence@glassfish.java.net

Re: How to change SQL-statements for Persistence Unit

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 20 Mar 2006 01:06:02 -0800

Dmitry,

Please also post the entities themselves - DESCRIPTION VARCHAR or CUSTOMER
VARCHAR look suspicious. What are the types of the corresponding fields?

thanks,
-marina

Sanjeeb Kumar Sahoo wrote:
> Hi Dmitry,
>
> Your persistence.xml looks perfect.
>
> Pramod,
> Is Dmitry's issue a known issue?
>
> Thanks,
> Sahoo
> Dmitry Mozheyko wrote:
>
>> -----Original Message-----
>> From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
>> To: persistence_at_glassfish.dev.java.net
>> Date: Fri, 17 Mar 2006 17:49:48 +0530
>> Subject: Re: How to change SQL-statements for Persistence Unit
>>
>>
>>
>>> Dmitry Mozheyko wrote:
>>>
>>>
>>>
>>>>> Did you specify any platform in you persistence.xml? The code tries
>>>>> to autodetect the database type, but if you specify it explicitly,
>>>>> your
>>>>> value will be used instead.
>>>>>
>>>>>
>>>>
>>>> Where i can find docs, examples about this file?
>>>>
>>>>
>>>>
>>>
>>> https://glassfish.dev.java.net/javaee5/persistence/entity-persistence-support.html#persistence.xml
>>>
>>>
>>> Can you send contents of your persistence.xml? Ideally, you don't
>>> have to use any special property to inform the runtime that you are
>>> using Postgress. It should be automatically detected for you.
>>>
>>> Thanks,
>>> Sahoo
>>>
>>>
>>
>>
>> Content of my persistence.xml:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <persistence xmlns="http://java.sun.com/xml/ns/persistence">
>> <persistence-unit name="em" transaction-type="JTA">
>> <jta-data-source>jdbc/PostgreSQL</jta-data-source>
>> <properties>
>> <property name="ddl-generation" value="createtables"/>
>> </properties>
>> </persistence-unit>
>> </persistence>
>>
>> "jdbc/PostgreSQL" - jndi name of my jdbc-resource.
>>
>> Thanks, Dmitry
>>
>>