Re: String value length

2024-02-19 Thread GCHQDeveloper29
Hi Francesco,

Awesome, thank you very much for clarifying that for me.

Regards,
GCHQDeveloper29

On Saturday, 17 February 2024 at 07:21, Francesco Chicchiriccò 
 wrote:

> On 16/02/24 19:36, GCHQDeveloper29 wrote:
> 
> > Hi Francesco,
> > 
> > Thank you for your timely response.
> > I have tried to insert the following snippet into my spring-orm.xml file 
> > (before the  and after the  for 
> > "org.apache.syncope.core.persistence.jpa.entity.group.JPAGPlainAttrUniqueValue",
> >  however it still appears to be creating as a VARCHAR(255) on postgresql as 
> > if the overrides are being ignored - if I have been a fool please do let me 
> > know.
> > 
> >  > class="org.apache.syncope.core.persistence.jpa.entity.anyobject.JPAAPlainAttrValue">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  > class="org.apache.syncope.core.persistence.jpa.entity.user.JPAUPlainAttrValue">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  > class="org.apache.syncope.core.persistence.jpa.entity.group.JPAGPlainAttrValue">
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> Hi,
> as you have correctly reported before, the column whose mapping you want to 
> change is declared as field in AbstractPlainAttrValue, so you need to add 
> something like:
> 
>  class="org.apache.syncope.core.persistence.jpa.entity.AbstractPlainAttrValue">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> right before the first  element in the file (see the declared XSD 
> for more information).
> 
> 
> As already said, please double check which ORM file you are effectively 
> using: there are different ones in fact for:
> 
> * PostgreSQL with JSONB support
> * MySQL with JSON support
> * Oracle, default or with JSON support
> * SQL server
> 
> if you are not in any of these 4 cases, then the default spring-orm.xml will 
> apply.
> 
> HTH
> Regards.
> 
> > On Friday, 16 February 2024 at 14:49, Francesco Chicchiriccò 
> > ilgro...@apache.org wrote:
> > 
> > > On 16/02/24 15:40, GCHQDeveloper29 wrote:
> > > 
> > > > Currently, string value'd schema are limited to 255 characters in 
> > > > length due to OpenJPA defaults.
> > > > It would be beneficial to either have this length as adjustable, 
> > > > increased or converted to a Lob.
> > > > The relevant code is within 
> > > > core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
> > > 
> > > Hi,
> > > you should be able to tweak any column definition by adjusting your local 
> > > ORM file.
> > > The actual file to change is the one indicated by the
> > > 
> > > persistence.domain[0].orm
> > > 
> > > property, e.g. spring-orm.xml by default.
> > > 
> > > The OpenJPA settings will in fact get metadata definitions both from Java 
> > > annotations (which are in fact immutable) and ORM xml file, with the 
> > > latter taking precedence over the former.
> > > 
> > > HTH
> > > Regards.
> 
> 
> --
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/


Re: String value length

2024-02-16 Thread Francesco Chicchiriccò

On 16/02/24 19:36, GCHQDeveloper29 wrote:

Hi Francesco,

Thank you for your timely response.
I have tried to insert the following snippet into my spring-orm.xml file (before the 
 and after the  for 
"org.apache.syncope.core.persistence.jpa.entity.group.JPAGPlainAttrUniqueValue", however it 
still appears to be creating as a VARCHAR(255) on postgresql as if the overrides are being ignored - 
if I have been a fool please do let me know.


   
 
   
 
   



   
 
   
 
   



   
 
   
 
   



Hi,
as you have correctly reported before, the column whose mapping you want to 
change is declared as field in AbstractPlainAttrValue, so you need to add 
something like:

  
    
  
    
  
    
  

right before the first  element in the file (see the declared XSD for 
more information).

As already said, please double check which ORM file you are effectively using: 
there are different ones in fact for:

* PostgreSQL with JSONB support
* MySQL with JSON support
* Oracle, default or with JSON support
* SQL server

if you are not in any of these 4 cases, then the default spring-orm.xml will 
apply.

HTH
Regards.


On Friday, 16 February 2024 at 14:49, Francesco Chicchiriccò 
 wrote:


On 16/02/24 15:40, GCHQDeveloper29 wrote:


Currently, string value'd schema are limited to 255 characters in length due to 
OpenJPA defaults.
It would be beneficial to either have this length as adjustable, increased or 
converted to a Lob.
The relevant code is within 
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java


Hi,
you should be able to tweak any column definition by adjusting your local ORM 
file.
The actual file to change is the one indicated by the

persistence.domain[0].orm

property, e.g. spring-orm.xml by default.

The OpenJPA settings will in fact get metadata definitions both from Java 
annotations (which are in fact immutable) and ORM xml file, with the latter 
taking precedence over the former.

HTH
Regards.


--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/



Re: String value length

2024-02-16 Thread GCHQDeveloper29
Hi Francesco,

Thank you for your timely response.
I have tried to insert the following snippet into my spring-orm.xml file 
(before the  and after the  for 
"org.apache.syncope.core.persistence.jpa.entity.group.JPAGPlainAttrUniqueValue",
 however it still appears to be creating as a VARCHAR(255) on postgresql as if 
the overrides are being ignored - if I have been a fool please do let me know.


  

  

  



  

  

  



  

  

  


Regards,
GCHQDeveloper29

On Friday, 16 February 2024 at 14:49, Francesco Chicchiriccò 
 wrote:

> On 16/02/24 15:40, GCHQDeveloper29 wrote:
> 
> > Currently, string value'd schema are limited to 255 characters in length 
> > due to OpenJPA defaults.
> > It would be beneficial to either have this length as adjustable, increased 
> > or converted to a Lob.
> > The relevant code is within 
> > core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
> 
> 
> Hi,
> you should be able to tweak any column definition by adjusting your local ORM 
> file.
> The actual file to change is the one indicated by the
> 
> persistence.domain[0].orm
> 
> property, e.g. spring-orm.xml by default.
> 
> The OpenJPA settings will in fact get metadata definitions both from Java 
> annotations (which are in fact immutable) and ORM xml file, with the latter 
> taking precedence over the former.
> 
> HTH
> Regards.
> 
> --
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/


Re: String value length

2024-02-16 Thread Francesco Chicchiriccò

On 16/02/24 15:40, GCHQDeveloper29 wrote:

Currently, string value'd schema are limited to 255 characters in length due to 
OpenJPA defaults.
It would be beneficial to either have this length as adjustable, increased or 
converted to a Lob.
The relevant code is within 
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java


Hi,
you should be able to tweak any column definition by adjusting your local ORM 
file.
The actual file to change is the one indicated by the

persistence.domain[0].orm

property, e.g. spring-orm.xml by default.

The OpenJPA settings will in fact get metadata definitions both from Java 
annotations (which are in fact immutable) and ORM xml file, with the latter 
taking precedence over the former.

HTH
Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/



String value length

2024-02-16 Thread GCHQDeveloper29
Currently, string value'd schema are limited to 255 characters in length due to 
OpenJPA defaults.
It would be beneficial to either have this length as adjustable, increased or 
converted to a Lob.
The relevant code is within 
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java