uPortal-Project / uPortal

Enterprise open source portal built by and for the higher education community.
https://www.apereo.org/projects/uportal
Apache License 2.0
270 stars 273 forks source link

Missing primary keys from a few tables #2162

Open bjagg opened 3 years ago

bjagg commented 3 years ago

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 commented 3 years ago

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

jgribonvald commented 3 years ago

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.