Subject: Re: Simple composite key of ansi padded strings

  Andi Huber 2018-06-22, 06:49
  Andi Huber 2018-06-22, 06:46
  Andi Huber 2018-06-22, 07:25
Hello,

I’m modeling my domain objects over an existing sql server database.  One
of my tables has a primary key that has two columns of type char(10).  The
values that come from columns like this appear with trailing spaces.  The
OID generated by Isis for a single column primary key works fine and shows
urls such as
http://localhost:8080/wicket/entity/dbo.courtcd:s_3AN-P%20%20%20%20%20 .
When I have a table that has two fields like this as the primary key, I get
this error:

Could not parse OID
'dbo.crtprecx:domainapp.modules.simple.dom.impl.CourtPrecinct_PK_3AN-P
    :ANCHORAGE '; should match pattern:
^((([!*])?([^:~$\^#]+):([^:~$\^#]+))((~[^:~$\^#]+:[^:~$\^#]+)*))([$][^:~$\^#]+)?([\^](\d+):([^:~$\^#]+)?:(\d+)?)?$

Do I have to now create a primary key class to use the trimmed values
of the string fields in the primary key, or is there another way to
handle this?

Thank you!

Brian
  Brian K 2018-06-26, 04:01