Skip to content

Commit 9d4f8c4

Browse files
committed
Fixing Realm's table plainAttrs column type
1 parent cc12004 commit 9d4f8c4

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

core/persistence-jpa/src/main/resources/META-INF/indexes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ under the License.
2323

2424
<entry key="Realm_parent_id">CREATE INDEX Realm_parent_id ON Realm(parent_id)</entry>
2525
<entry key="Realm_fullPath_startsWith">CREATE INDEX Realm_fullPath_startsWith ON Realm USING GIN (to_tsvector('english', fullPath))</entry>
26+
<entry key="Realm_plainAttrs_idx">CREATE INDEX Realm_plainAttrs_idx ON Realm USING gin ((plainAttrs) jsonb_path_ops)</entry>
2627

2728
<entry key="SyncopeUser_realm_id">CREATE INDEX SyncopeUser_realm_id ON SyncopeUser(realm_id)</entry>
2829
<entry key="SyncopeUser_username">CREATE UNIQUE INDEX SyncopeUser_username ON SyncopeUser(username)</entry>

core/persistence-jpa/src/main/resources/META-INF/mariadb/spring-orm.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,13 @@ under the License.
6969
</basic>
7070
</attributes>
7171
</entity>
72+
73+
<entity class="org.apache.syncope.core.persistence.jpa.entity.JPARealm">
74+
<attributes>
75+
<basic name="plainAttrs">
76+
<column column-definition="json"/>
77+
<lob/>
78+
</basic>
79+
</attributes>
80+
</entity>
7281
</entity-mappings>

core/persistence-jpa/src/main/resources/META-INF/mysql/spring-orm.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,13 @@ under the License.
6969
</basic>
7070
</attributes>
7171
</entity>
72+
73+
<entity class="org.apache.syncope.core.persistence.jpa.entity.JPARealm">
74+
<attributes>
75+
<basic name="plainAttrs">
76+
<column column-definition="json"/>
77+
<lob/>
78+
</basic>
79+
</attributes>
80+
</entity>
7281
</entity-mappings>

core/persistence-jpa/src/main/resources/META-INF/oracle/indexes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ under the License.
3434

3535
<!-- The following indexes require Oracle TEXT to be installed on the given Oracle database:
3636
http://dbaflavours.blogspot.com/2012/09/ora-29833-indextype-does-not-exist_18.html -->
37+
<entry key="Realm_plainAttrs_Index">CREATE SEARCH INDEX Realm_plainAttrs_Index ON Realm(plainAttrs) FOR JSON</entry>
3738
<entry key="AnyObject_plainAttrs_Index">CREATE SEARCH INDEX AnyObject_plainAttrs_Index ON AnyObject(plainAttrs) FOR JSON</entry>
3839
<entry key="SyncopeGroup_plainAttrs_Index">CREATE SEARCH INDEX SyncopeGroup_plainAttrs_Index ON SyncopeGroup(plainAttrs) FOR JSON</entry>
3940
<entry key="SyncopeUser_plainAttrs_Index">CREATE SEARCH INDEX SyncopeUser_plainAttrs_Index ON SyncopeUser(plainAttrs) FOR JSON</entry>

core/persistence-jpa/src/main/resources/META-INF/oracle/spring-orm.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,13 @@ under the License.
6868
</basic>
6969
</attributes>
7070
</entity>
71+
72+
<entity class="org.apache.syncope.core.persistence.jpa.entity.JPARealm">
73+
<attributes>
74+
<basic name="plainAttrs">
75+
<column column-definition="CLOB CHECK (plainAttrs IS JSON)"/>
76+
<lob/>
77+
</basic>
78+
</attributes>
79+
</entity>
7180
</entity-mappings>

core/persistence-jpa/src/main/resources/META-INF/spring-orm.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,13 @@ under the License.
6969
</basic>
7070
</attributes>
7171
</entity>
72+
73+
<entity class="org.apache.syncope.core.persistence.jpa.entity.JPARealm">
74+
<attributes>
75+
<basic name="plainAttrs">
76+
<column column-definition="jsonb"/>
77+
<lob/>
78+
</basic>
79+
</attributes>
80+
</entity>
7281
</entity-mappings>

0 commit comments

Comments
 (0)