You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Paolo Salvan <pa...@omitech.it> on 2004/06/04 13:18:00 UTC

OJB, MYSql and Druid.... next question....

Well, thanks to your help I've created the OJB .java files and the 
repository.xml file.

Two question:

- Is there some better or more automated way to associate a java data type to 
every SQL field type than setting the "DD equiv." in data types?

- Does Druid suppose that the field naming convention is FirstLetterCapital? 
Can I use the ALL_CAPITAL_WITH_UNDERSCORE naming convention?

I've gotten, in the .java file, something like:

   public int NUM_CAMERE_DA_1A;

   public int getNUM_CAMERE_DA_1D() { return NUM_CAMERE_DA_1D; }

   public void setNUM_CAMERE_DA_1D(int NUM_CAMERE_DA_1D) {
      this.NUM_CAMERE_DA_1D = NUM_CAMERE_DA_1D;
   }


I'd like to get something like:

   public int numCamereDa1A;

   public int getNumCamereDa1D() { return numCamereDa1A; }

   public void setNumCamereDa1D(int numCamereDa1A) {
      this.numCamereDa1A = numCamereDa1A;
   }

...should I rename all the DB fields, or is there some different solution?

Thank and bye!


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: OJB, MYSql and Druid.... next question....

Posted by A Leg <ha...@yahoo.com>.
Hi Paolo

To associate a Type :
select the table in the table tree
On the right side you will have access to this table fields
Select the field you want to modify clicking in the Type part .
Datatype Selector arrive, click on the datatype you want, then right 
click and a "Choose this DataType box" arrive.
If you select it, it is done.

Don't make to make modifications without saving.

Forums on Druid sourceforge site are very helpfull.

Best regards

Andre

Paolo Salvan wrote:

>Well, thanks to your help I've created the OJB .java files and the 
>repository.xml file.
>
>Two question:
>
>- Is there some better or more automated way to associate a java data type to 
>every SQL field type than setting the "DD equiv." in data types?
>
>- Does Druid suppose that the field naming convention is FirstLetterCapital? 
>Can I use the ALL_CAPITAL_WITH_UNDERSCORE naming convention?
>
>I've gotten, in the .java file, something like:
>
>   public int NUM_CAMERE_DA_1A;
>
>   public int getNUM_CAMERE_DA_1D() { return NUM_CAMERE_DA_1D; }
>
>   public void setNUM_CAMERE_DA_1D(int NUM_CAMERE_DA_1D) {
>      this.NUM_CAMERE_DA_1D = NUM_CAMERE_DA_1D;
>   }
>
>
>I'd like to get something like:
>
>   public int numCamereDa1A;
>
>   public int getNumCamereDa1D() { return numCamereDa1A; }
>
>   public void setNumCamereDa1D(int numCamereDa1A) {
>      this.numCamereDa1A = numCamereDa1A;
>   }
>
>...should I rename all the DB fields, or is there some different solution?
>
>Thank and bye!
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org