Share

SQL to Java Code Generator

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Change the mapping of datatypes for oracle db

You are viewing a single message from this topic. View all messages.

  1. 2009-02-02 22:23:46 UTC
    Hi,
    while generating the sql2java-classes for a oracle db, I got some datatype mappings which seems strange to me, f.e. the java-type java.lang.Object is generated for the db-type NVARCHAR2 which should be mapped into a java.lang.String.
    I'd like to configure the following mappings:

    NUMBER(10,0) --> Long
    NVARCHAR2 --> String

    Where and how can I change the dataype mappings?
    (I found the 3 examples for the DATE, TIME and TIMESTAMP mappings in the sql2java.properties, but can other types be mapped there too? How?)

    By the way: I found, that the generation results in other datatype mappings if I choose a MySQL DB ...

    greetings
    thomas
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.