Hi,

I want to know if we can do the following...

Create a column in the schema, say XYZ.
Now XYZ is stored in the DB as an INTEGER. But on the java side, I want it 
to be represented as an ENUM. Basicaly, when we access the column XYZ in 
the java code, an ENUM is returned rather than an INTEGER. There might not 
be any difference between ENUM and INTEGER but as far as the application is 
concerned, it is dealing with an ENUM. It shouldn't matter how it is being 
stored in the DB.
In ObjectBridge, there is a way to map a column to any java type provided 
that we provide a couple of methods, java2db() and db2java(). I was 
wondering if there is a way to do this in Torque. I think, in the torque 
schema, there is a "javatype" attribute for the columns. But, it can only 
take values "object" or "primitive".

Secondly, All the "om" classes are created in the same directory. (whatever 
package name you provide). For instance, in the torque example provided, 
all the classes for "Author", "Book", "Publisher" are created in the same 
directory (say ABC). Is there a way so that the directory structure can be 
"ABC/Author", "ABC/Book", "ABC/Publisher". This will result in a more 
maintainable O/R layer for the developers. If all the classes are created 
in the same directory, it becomes unmanageable after say 10-15 tables. 
(more so if you're using "managers").

Thanks,
Prashant


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to