BO with Guid (UniqueIdentifier) as Primary Key


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Hrm.  That is weird.  The BOMapper must have a schema off one of the meta-data queries.  
Chris Diesel
Chris Diesel
StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)
Group: StrataFrame Users
Posts: 74, Visits: 300
Found the problem. I had the same table name under a Test schema in the same database.  When I removed the primary key from it, the database object mapper picked up the primary key in the dbo schema.  Weird...
Chris Diesel
Chris Diesel
StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)
Group: StrataFrame Users
Posts: 74, Visits: 300
SQL Management Studio shows the key symbol but the Business Object Mapper does not.  It shows the new field, just not as a key though.

I'm mapping directly to Sql.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
When you go into the BO mapper, does it show the key symbol for the list view icon for the row that marks the id field?

Are you mapping to SQL Server directly, or are you mapping to the DDT?
Chris Diesel
Chris Diesel
StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)
Group: StrataFrame Users
Posts: 74, Visits: 300
I originally had a table with an Integer Primary Key that was Auto Generated (Is Identity = true) on the server.  The business object property _PrimaryKeyFields contains the field "Id".

I added a new field Guid (UniqueIdentifier) to the table and changed the primary key to it instead of the Id field.  When I build the partial class with the Business Object Mapper, the _PrimaryKeyFields property does not contain any field names.

What am I doing wrong???
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search