[midPoint] User string attributes limited to 256 chars?
Pavol Mederly
mederly at evolveum.com
Mon Mar 23 12:08:17 CET 2015
Hello Martin,
first of all, welcome on the list :)
As for your problem, there are two solutions:
1) For *extension attributes* you can simply turn off storing of their
string value into the database. They would be stored only as a part of
XML representation of the user in the FULLOBJECT column, which has no
size limit.
An advantage of this solution is its simplicity (just editing the
extension schema).
A disadvantage is that you'll lose the possibility to construct queries
related to this attribute. For example, you'll not be able to look for
all objects having a particular value for this attribute.
Specifically, you just have to include the following to the schema:
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://whatever.com/my"
xmlns:tns="http://whatever.com/my"
xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="UserExtensionType">
<xsd:annotation>
<xsd:appinfo>
<a:extension ref="c:UserType"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
*<a:indexed>false</a:indexed>*
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
However, in order for this to work, you have to use the latest master
(v3.2devel-277-g65cbe8a or later). Use with caution, as it might be a
bit unstable.
2) For *standard attributes* as well as for extension attributes that
you want to search for, you have to change the DB schema, as you said.
Currently there is no other solution.
Please note that some databases (e.g. MySQL) are limited in the size
allowed for the indices, so e.g. unique constraints might not work
properly for large strings.
Best regards,
Pavol
On 19. 3. 2015 19:48, Martin Lízner - AMI Praha a.s. wrote:
> Hello everybody, Im new to midPoint and to this list :-) As ex-Sun IdM
> fan, Im glad that Evolveum picked up the strong customization concept
> from Sun IdM, while introducing many new features and technologies.
>
> I have found limitation in length of user attribute - either extended
> (xsd:string) or default, all of them seem to be limited to 256 chars.
> I need more - lets say 1024 long text. The error message, Im getting
> is DB varchar column too short. The obvious resolution would be to
> extend the varchar in DB, but maybe Im missing something and there is
> more convenient way to do it...? Im using embedded DB atm.
>
> Thanks, Martin
>
> Martin Lízner
> solution architect
>
> gsm: [+420] 737 745 571
> e-mail: martin.lizner at ami.cz <mailto:jmeno.prijmeni at ami.cz>
>
>
>
> AMI Praha a.s.
> Pláničkova 11
> 162 00 Praha 6
> tel.: [+420] 274 783 239
> web: www.ami.cz <http://www.ami.cz/>
>
>
>
>
> <http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/audit-roli-a-opravneni-sap>
>
>
> Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
> společnost AMI Praha a.s.
> jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít
> výhradně písemnou formu.
>
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150323/3977e127/attachment.htm>
More information about the midPoint
mailing list