3.0 Can't refresh schema with entities w/o pkeys ?

Posts   
 
    
happyfirst
User
Posts: 215
Joined: 28-Nov-2008
# Posted on: 11-Oct-2010 04:23:54   

LL 3.0, Oracle.

I've converted another 2.6 project to 3.0. However, in 3.0, it's complaining about some entities not having primary keys. So their tables were given primary keys. However, I can't seem to refresh my schema from the db.

I clicked "Refresh Relational Model Data from a Database" but it immediately complains about the entities with no keys.

Plus, the oracle connection name is now a different string. Will I still be able to change the target database? I don't see where I can change this.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 11-Oct-2010 06:48:31   

happyfirst wrote:

I've converted another 2.6 project to 3.0. However, in 3.0, it's complaining about some entities not having primary keys. So their tables were given primary keys. However, I can't seem to refresh my schema from the db.

I clicked "Refresh Relational Model Data from a Database" but it immediately complains about the entities with no keys.

The problem is that the entities doesn't have any identifying fields. This validation happens before the DB refresh. So if you added PK in your tables to fix this, try removing such entities and now refresh your model. Another thing you can do is set identifying fields in the involved entities. This is copied from LLBGen manual:

Identifying fields. These are the fields (one or more) which form the 'primary key' or 'identifying fields' for the entity. Most target frameworks supported by LLBLGen Pro require that every entity has at least one field set as Identifying Field and it is good practice to have at least one field as Identifying Field. To specify the identifying fields for an entity, click the 'Edit...' button next to the Identifying Fields textbox. An alternative is to select the fields in the Project Explorer, right-click them and select 'Select Selected Fields as Identifying Fields' in the context menu. Only fields which are allowed as identifying fields are selectable as identifying field: optional fields and fields which have a Value Type Definition as their type aren't allowed as Identifying fields.

happyfirst wrote:

Plus, the oracle connection name is now a different string. Will I still be able to change the target database? I don't see where I can change this.

You can rename the database at Catalog Explorer. Also, when you refresh the schema, you can change the server name (or dsn for oracle).

David Elizondo | LLBLGen Support Team