Business Entity for Tables without Unique Index
 
Forums / SmartComponent Library - Developer Forum / Business Entity for Tables without Unique Index

Business Entity for Tables without Unique Index

5 posts, 1 answered
  1. Markus Grigoleit
    Markus Grigoleit avatar
    31 posts
    Registered:
    04 Jun 2019
    04 Jun 2019
    Link to this post
    we were wondering if there is a way to create business-entities for tables which have no unique identifier. So far we improvised via business-tasks.
    Maybe someone experienced something similar and want to share a solution for this problem

    Thanks in advance
  2. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    04 Jun 2019 in reply to Markus Grigoleit
    Link to this post
    We have a few tables the same way. We plan on adding a GUID to the table at some point but in the short term we added a field to the TT to store the records ROWID and used that for the unique index. 
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    Answered
    04 Jun 2019 in reply to Markus Grigoleit
    Link to this post
    Here is a similar question I asked months ago. Mike has a more detailed answer.

    https://www.consultingwerk.com/support/forum/smartcomponent-library---developer-forum/unique-primary-index

  4. Markus Grigoleit
    Markus Grigoleit avatar
    31 posts
    Registered:
    04 Jun 2019
    04 Jun 2019 in reply to Roger Blanchard
    Link to this post
    I forgot to mention that you should assume that it's not possible to change the tables in any way 
  5. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    04 Jun 2019 in reply to Markus Grigoleit
    Link to this post
    You don't have to change the tables in the DB. You would need to change the TT and add a field to store the ROWID from the DB record.
5 posts, 1 answered