Hi All,

Can I persist implementations of Map interface (HashMap, ConcurrentHashMap)
and Set interface (HashSet) in Isis?

In one of my entity classes I had to include these data types for data
anlysis purposes.
When I go through the persistence debug logs when the database is created
at server startup, I notice that above properties in my entity class are
not mapped to any db_schema by jdo.

Thanks,
Dileepa


On Wed, Jul 23, 2014 at 4:44 PM, Dileepa Jayakody <[email protected]
> wrote:

> Thanks Oscar and Dan.
>
> I tried using @Column(length=1000), the max.length error is gone, but now
> I'm getting an aborted Isis transaction [1] for some reason. Maybe it's due
> to some other reason, I will check that.
>
> Thanks for the pointers.
>
> Regards,
> Dileepa
>
> [1]
> [exec] 16:39:01,440  [IsisTransaction      qtp1065406375-36 INFO ]  abort
> transaction IsisTransaction@31117256[state=MUST_ABORT,commands=0]
>
>
>
>
> On Wed, Jul 23, 2014 at 4:34 PM, Dan Haywood <[email protected]
> > wrote:
>
>> On 23 July 2014 11:58, Dileepa Jayakody <[email protected]>
>> wrote:
>>
>> > Hi All,
>> >
>> > In my project developed using Isis, I'm persisting an email entity in
>> which
>> > emailHeader is stored as a String.
>> > When trying to persist the entities I get following error indicating the
>> > value of emailHeaders exceed the default max.length of JDO/datanucleus.
>> Can
>> > I increase this max.length? Do I need to use another type to store the
>> > emailHeaders?
>> >
>> >
>> Or, you could use CLOB, I think, see [1]
>>
>> But SQL Server supports lengths up to 8000 (or is it 4000), so you might
>> want to explore just specifying a longer length as well; it might work
>> depending on the RDBMS you are using (as per Oscar's suggestion)
>>
>> Downside of using CLOB... the data is stored off-record, so is more
>> expensive to read (for the DBMS).
>>
>> HTH
>> Dan
>>
>> [1]
>>
>> https://github.com/apache/isis/blob/master/core/module-command-jdo/src/main/java/org/apache/isis/objectstore/jdo/applib/service/command/CommandJdo.java#L434
>>
>>
>>
>>
>> > Thanks,
>> > Dileepa
>> >
>> >  " in column ""emailHeaders"" that has maximum length of 255. Please
>> > correct
>> > your data!
>> >      [exec]     at
>> >
>> >
>> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:498)
>> >      [exec]     at
>> >
>> >
>> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:736)
>> >      [exec]     at
>> >
>> >
>> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:756)
>> >
>>
>
>

Reply via email to