persistence@glassfish.java.net

Re: how to map NVARCHAR2 columns

From: Rochelle Raccah <Rochelle.Raccah_at_Sun.COM>
Date: Thu, 31 Aug 2006 16:46:08 -0700

Marina Vatkina wrote:

> Rochelle Raccah wrote:
>
>> Okay, the verifier bug goes away if a stateless session bean is added
>> to the project, so:
>>
>> 1) For cmp this is still an issue - is there a better thing to
>> generate than Object for this case? Can we handle char with the
>> formOfUse change?
>
>
> It'll be a feature request.

Okay, so what should we generate until such a feature is implemented?

>
>> 2) For JPA, we generate
>> @Id
>> @Lob
>> @Column(name = "GENRE", nullable = false)
>> private Object genre;
>> It verifies correctly, but is it okay?
>
>
> No. You can't have Lob as an ID (is NVARCHAR2 really a Lob?). And I don't
> think that Object shouldn't be a valid persistent field type.
>
That's pretty much what I thought. The reason it's getting Lob is
because the jdbc type is coming across as OTHER and we put Lob for that.

Why isn't this failing the verifier?

Rochelle


> thanks,
> -marina
>
>>
>> Thanks,
>> Rochelle
>>
>> Rochelle Raccah wrote:
>>
>>> Both, I think. Right now, the generated JPA has fields of type
>>> Object as well, but the verifier is not working for it:
>>> <https://glassfish.dev.java.net/issues/show_bug.cgi?id=1049>
>>>
>>> Rochelle
>>>
>>> Marina Vatkina wrote:
>>>
>>>> Rochelle,
>>>>
>>>> The NB bug talks about cmp - is it cmp or JPA (or both) related
>>>> question?
>>>>
>>>> thanks,
>>>> -marina
>>>>
>>>> Peter Krogh wrote:
>>>>
>>>>> Supporting 'N' Types requires Oracle Specific JDBC calls, that are
>>>>> not currently supported by TopLink Essentials. Support for N types
>>>>> sounds like a good feature request to be added to the issue tracker.
>>>>>
>>>>> Note: Adding this support may require changes to the build system
>>>>> to compile classes with references to Oracle JDBC specific classes.
>>>>> -----Original Message-----
>>>>> From: Rochelle.Raccah_at_Sun.COM [mailto:Rochelle.Raccah_at_Sun.COM]On
>>>>> Behalf
>>>>> Of Rochelle Raccah
>>>>> Sent: Tuesday, August 29, 2006 8:29 PM
>>>>> To: persistence_at_glassfish.dev.java.net
>>>>> Subject: how to map NVARCHAR2 columns
>>>>>
>>>>>
>>>>> For background, please see
>>>>> <http://www.netbeans.org/issues/show_bug.cgi?id=68997>.
>>>>>
>>>>> The question is, are NVARCHAR2 columns allowed in a schema? If so,
>>>>> how
>>>>> can they be mapped? And, do we have a way to generate the formOfUse
>>>>> calls if necessary?
>>>>>
>>>>> Thanks,
>>>>> Rochelle
>>>
>>>
>>>
>>>