Announcement Announcement Module
No announcement yet.
BigDecimal Vs Long - default type Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • BigDecimal Vs Long - default type


    Why does the default identifier type for the "entity jpa" is Long.
    but the default IDs for "database reverse engineer" is BigDecimal, even when it has 10 digits only.

    I wonder the impact of using type BigDecimal in a big database instead of type Long, or even why the need for using such class when dealing only with 10 digits IDs.

    now I noticed that the "entity jpa" has the option --identifierType,
    shouldn't be the case to give "database reverse engineer" that option too?

  • #2
    The DBRE-add-on generates ID (and other) fields depending on what is returned by the database's jdbc driver. Using a --identifierType option on the database reverse engineer command is pointless as the database determines the types and identifiers are generated - not the user. There are limited options available such as to include and exclude tables, and what package your types are generated.