Table Naming Question

Posts   
 
    
gfinstad
User
Posts: 13
Joined: 09-May-2007
# Posted on: 10-Nov-2008 18:28:58   

I have a database with the following tables; Packet Form PacketForm PacketFormField

PacketForm is basically a junction table between Packet and Form. PacketFormField then is related to PacketForm in m:1 relationship and contains the Field information for each for the PacketForms.

My question is: Is it possible that LLBL could have a problem with the name PacketFormField as I seem to be missing prefetch paths and there is not relation listed under Entities > PacketForm > Relations

Thanks

Gale

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 11-Nov-2008 03:36:26   

Hi Gale,

  • Do you see the relations at LLBLGenPro Designer? (maybe some relations are hidden, or some relations doesn't exist at DB, so they aren't mapped).

  • What DB are you using?

  • And... what LLBLGen version and build version (see the window's title) are you using?

David Elizondo | LLBLGen Support Team
gfinstad
User
Posts: 13
Joined: 09-May-2007
# Posted on: 12-Nov-2008 17:04:22   

I am using LLBL Gen Pro Ver. 2.6 (Jume 6th, 200sunglasses , MS SQL Server 2005.

The relation exists in the database but isn't there in the LLBL > Entities > PackForm > Relations or in the LLBL > Entities > PacketFormField > Relations.

Can I add it manually?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 12-Nov-2008 17:13:00   

Yes you can manually add a relation (custom relation).

But first let me ask, is the existing database relation based on a PK? Would you please post a simple ascii sketch to describe the 2 tables and their relations?

gfinstad
User
Posts: 13
Joined: 09-May-2007
# Posted on: 12-Nov-2008 17:45:35   

Tables PacketForm and PacketFormField PacketFormField PacketForm PacketFormFieldIdent(Primary Key) PacketFormIdent (Primary Key) 1 --To --> M PacketFormIdent FormIdent FieldCode More Fields... MoreFields...

There is a Key in the PacketFormField table - FK_PacketFormField_PacketForm.

In the Foreign Key Relationships window the following information is displayed: (-) General Tables And Columns Specification

    Foreign Key Base Table                     PacketFormField
    Foreign Key Columns                        PacketFormIdent

    Primary/Unique Key Base Table               PacketForm
    Primary/Unique Key Columns                 PacketFormIdent

(-) Identity Name FK_PacketFormField_PacketForm

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 13-Nov-2008 10:48:25   

Try to refresh the catalog as I have a feeling the lgp project is not in sync with the database.

gfinstad
User
Posts: 13
Joined: 09-May-2007
# Posted on: 13-Nov-2008 17:13:23   

Well that fixed it... Guess I should have tried that first. These tables and relationships have been in the database from the start. I am not sure how they got "left out".

Anyway, thanks for the help.

Gale