Oracle - Missing Foreign Keys / Relations

Posts   
 
    
Hamer
User
Posts: 2
Joined: 05-Jan-2007
# Posted on: 05-Jan-2007 22:43:28   

I am connecting to an Oracle 10g Database that contains several relations between various tables. It seems to be a typical relational database, with several levels of related table depth via foreign keys and primary keys.

The problem I am having is that not all of the foreign keys are coming across as relations when I "add new entities mapped on tables from the catalog."

When I attempt to manually create the relations, it does not work either. In the custom entity relation editor, the fields in the "using the following entity field relations table" are not populated when I select the foreign key side of the "is on the" drop down. The child table has a foreign key column that is the primary key of the parent table.

Is there an additional setting I am missing or a database architecture I am not implementing that prevents a foreign key from creating a relation using LLBLGen Pro? The fields are both number fields of the same length and precision.

I am excited to begin using this application as it appears to be a very robust tool.

Thanks for any help regarding this problem.

Chester
Support Team
Posts: 223
Joined: 15-Jul-2005
# Posted on: 07-Jan-2007 19:22:57   

I'm not that familiar with Oracle's datatypes, but I've never seen a foreign key using a decimal/float data type.

That said, LLBLGen should bring in the relations just fine. I tested this on a SQL database with decimal datatypes (I don't have access to Oracle currently) and it brought the relations in just fine.

Are you sure that the fk constraints exist in your database? What version and release date of LLBLGen are you using?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 08-Jan-2007 09:59:36   

Please check the application output window in the llblgen pro designer, it will enlist the errors it encounters.

Frans Bouma | Lead developer LLBLGen Pro
Hamer
User
Posts: 2
Joined: 05-Jan-2007
# Posted on: 08-Jan-2007 18:05:40   

Unique keys exist in this particular database instead of primary keys, of which both cannot be present on the table.

From Google:

The difference between an unique and primary key is that in a primary key non-null values are not allowed. Oracle automatically creates indexes to protect the integrity of the columns.

I will change these to primary keys, but what is your opinion regarding making links to unique keys rather than primary keys?

Error log: CatalogRetriever::The following table(s) do not have a primary key present: ::[rhvmlshop].[TSTD_OWNER].[BADLOG] ::[rhvmlshop].[TSTD_OWNER].[CHANGE_MGMT] ::[rhvmlshop].[TSTD_OWNER].[LOGONTRACKER] ::[rhvmlshop].[TSTD_OWNER].[PARAM_VALUE_CACHE] ::[rhvmlshop].[TSTD_OWNER].[RULE_GROUP] ::[rhvmlshop].[TSTD_OWNER].[RULE_TYPE] ::[rhvmlshop].[TSTD_OWNER].[STAND] ::[rhvmlshop].[TSTD_OWNER].[TEST_ELEMENT] ::[rhvmlshop].[TSTD_OWNER].[TEST_RECORD_BAK] ::[rhvmlshop].[TSTD_OWNER].[TEST_RESULTS] ::[rhvmlshop].[TSTD_OWNER].[TEST_RESULTS_BAK] ::[rhvmlshop].[TSTD_OWNER].[TESTINSERTPROC] ::[rhvmlshop].[TSTD_OWNER].[USER_STAND] ::[rhvmlshop].[TSTD_OWNER].[USERS_LIST]

Thanks for the help. I appreciate it.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 09-Jan-2007 09:16:34