I'm using Entity Manager 3.6.6 and I'm working on generating entities from tables with Dali in Eclipse.
I have tables that look something like this:
Code:
CREATE TABLE person (
id NUMBER(22,0) PRIMARY KEY,
name VARCHAR(20),
gender_id NUMBER(22,0) NOT NULL,
address_id NUMBER(22,0)
)
There is a gender table without a foreign key constraint as it is turned into an enumerations later. Hence, my desire for a Basic mapping type on that field, and not a One-to-One to the gender table.
My problem is that the id becomes type long, and the gender_id and address_id become type BigDecimal. It would seem that this is the expected behavior of the "sequence" and "hilo" id generators. I kinda wanted to use "sequence".
If I include the gender and address tables into the entity generation process, the gender_id and address_id will get generated as long, and not BigDecimal. I presume this is because of the id generation requirement for long on those tables.
If I don't select to create entities for gender and address, I will be presented with the option to set the basic type of the address_id. I WON'T be presented with the option to change the basic type of gender_id. I'm starting to think this is a bug in Dali regarding the "NOT NULL".
Is there a way for me to globally ensure that all NUMBER(22,0) database types get mapped to type long?