Skip to Content

Serial PK attribute in a logical model and inheritance

Hi,

My question is related to this question but in the context of logical models and inheritance.

I came across an interesting issue. I have a two entities, Entity1 and Entity2. Entity2 inherits Entity1. If I define a serial PK attribute in Entity1 then Entity2 inherits it which is not really what I want because the PK value is driven by Entity1.

Is there any way to work around this and set the type of the attribute in the child entity to a compatible type, integer for instance?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 10 at 04:13 PM

    I think "serial" should have been a Yes/No attributes of the domain rather than a type by itself.

    Thanks for the suggestions.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 10 at 12:06 PM

    You could use a business-oriented data type in the LDM, and use a model transformation to convert them to Serial when you generate or update a PDM. The transformation would need to know which data types to convert, based perhaps on some property of the table, or of the column.

    You could do something similar in the LDM, of course.

    Add comment
    10|10000 characters needed characters exceeded