uPortal icon indicating copy to clipboard operation
uPortal copied to clipboard

Missing primary keys from a few tables

Open bjagg opened this issue 3 years ago • 2 comments

Describe the bug There are missing primary keys in 3 tables. The cause seems to be due to using @jointable rather than @collectiontable

- UP_EVENT_AGGR_CONF_INTRVL_EXC
- UP_EVENT_AGGR_CONF_INTRVL_INC
- UP_SS_DESC_LAY_ATTR_ELMS

To Reproduce Steps to reproduce the behavior:

  1. run gradlew dataInit

Expected behavior All uPortal tables have primary keys defined

bjagg avatar Sep 10 '20 16:09 bjagg

https://www.logicbig.com/tutorials/java-ee-tutorial/jpa/collection-table.html

https://github.com/Jasig/uPortal/blob/271f309ed71d57396737ef0c56f2a2dff4b61a73/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dao/jpa/LayoutAttributeDescriptorImpl.java

bjagg avatar Sep 11 '20 01:09 bjagg

Good catch ! The thing is that the ID column exist but they aren't defined as PrimaryKeys ! The patch is easy, like the migration for existing datas.

jgribonvald avatar Sep 11 '20 09:09 jgribonvald