Insert Fails on BOs Created From Views


Author
Message
choyt
choyt
StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)
Group: Forum Members
Posts: 78, Visits: 246
When we attempt to do an NewRow/Save through a BO that was created based on a VIEW, we get this error

"Cannot create INSERT command because the business object does not contain any PrimaryKeyFields"

I tried to set the PrimaryKey in the BO but that is a read only property.

Is there a way to work around this?

Thanks!

Clay

Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Edhy is right on the money...you will need to specify a primary key through the BO mapper...you will also need to make the view updatable by binding to the schema.  So ensure that your view is updatable and then open the BO Mapper and specify a primary key override for the view.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search