Re: Postgres HStore implementation

2014-06-30 Thread Krzysztof
You'd need jdbc mapper for hstore (might be included in newer jdbc drivers), I use this one: /*- * * Gaia CU7 variability * * Copyright (C) 2005-2020 Gaia Data Processing and Analysis Cons

Re: Custom data store implementation guidelines

2013-06-05 Thread Krzysztof
Hi, I agree that clear architectural picture and dataflow would help to understand how to extend and how to deal with its bugs and inefficiencies (doable=>worth investing time/not-doable). You might want to check specific HandlerStrategy from org.apache.openjpa.meta.strats, i.e. HandlerFieldStrate

Re: how to deal with jdbc4 sql array?

2012-11-16 Thread Krzysztof
Did you use the amended Strategy as well? This should replace @Basic strategy used by default otherwise.. -- View this message in context: http://openjpa.208410.n2.nabble.com/how-to-deal-with-jdbc4-sql-array-tp7581756p7581792.html Sent from the OpenJPA Users mailing list archive at Nabble.com

Re: how to deal with jdbc4 sql array?

2012-11-15 Thread Krzysztof
Use your own strategy: @PersistentCollection @Strategy("gaia.cu7.om.dal.dictionary.PostgresArrayHandler") private double[] timeDecay; Example for float8[] below, change toDataStoreValue to deal with Long/bigint. PostgresArrayHandler.java

Re: Memory leak for long-lived (read-only) EM?

2012-11-07 Thread Krzysztof
Hello Rick, Have you had a chance to have a look at the dump? I will make some additional tests by minimizing all the external dependencies and report back but would appreciate independent eye. Cheers -- View this message in context: http://openjpa.208410.n2.nabble.com/Memory-leak-for-long-liv

Re: Memory leak for long-lived (read-only) EM?

2012-10-31 Thread Krzysztof
Setting QueryCache to false did not seem to affect the bahviour - still same memory usage. Should I provide the heap dump as well for this one? DataCache show through jmx beans rather light usage too. But maybe the links are hidden somehow via the LRS proxies - cache holds owner of LRS entities

Re: Memory leak for long-lived (read-only) EM?

2012-10-30 Thread Krzysztof
Hello Rick, Thanks for responding. Yes, em.clear() is there after each transaction, memory grows and GC starts to dominate at some point and finishes with OOM. Normally I'd expect few tens of MBs to be occupied at each transaction. A second thought: I use mvel (dynamically executed java on entitie

Memory leak for long-lived (read-only) EM?

2012-10-30 Thread Krzysztof
Hello, I have noticed that with openjpa 2.2.0 (have not checked earlier versions) even for short lived transactions caches field _joinsPK and _joins of org.apache.openjpa.jdbc.schema.ForeignKey for all traversed entities using the Iterator for the resultset. The jprofiler dump shows count (15461

Re: AW: Adding another abstract class to the inheritance chain breaks callbacks parsing

2012-04-23 Thread Krzysztof
I found the solution: if the type was defined in the orm.xml (even without any callbacks specified there) - callback from the code were not called. Solution is either to remove the class from orm.xml or move the callbacks there. --- Krzysztof -- View this message in context: http://openjpa

Re: AW: Adding another abstract class to the inheritance chain breaks callbacks parsing

2012-03-30 Thread Krzysztof
Thanks for the hint, but yes: all abstract classes in the inheritance chain have @MappedSuperclass and @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) Also the concrete class at the end has the @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) Changing @Entity to @MappedSuperc

Re: OpenJPA 1.2.2 - setFirstResult/setMaxResults not working for ORACLE 11g

2011-06-24 Thread Krzysztof
Hello, This query looks ok, this is standard trick to get paged results in Oracle the fastest possible way, known for many years. check i.e. : http://asktom.oracle.com/pls/apex/f?p=100:11:0P11_QUESTION_ID:127412348064 Cheers, Krzysztof -- View this message in context: http://openjpa

ManyToOne "cannot be mapped without stringifying the oid of the related object to a string column." in a unidirectional relationship.

2011-05-19 Thread Krzysztof
ht help but this would trigger many changes in already tested code that should not be affected by this link. Any help appreciated. Should I create a jira for that? Cheers, Krzysztof -- View this message in context: http://openjpa.208410.n2.nabble.com/ManyToOne-cannot-be-mapped-without-stringifying-the-

Re: Proxy of custom strategy nullifies all its fields -was:XMLValueHandler strategy not supported in Postgres?

2011-05-06 Thread Krzysztof
Yes indeed! What is interesting it was enough to just add setters to the root object, all nested levels are populated properly. Big thanks for the hints! -- View this message in context: http://openjpa.208410.n2.nabble.com/XMLValueHandler-strategy-not-supported-in-Postgres-tp6331286p6337408.html

Re: Proxy of custom strategy nullifies all its fields - was:XMLValueHandler strategy not supported in Postgres?

2011-05-06 Thread Krzysztof
Milosz, Will try now with 8.3jdbc3 that is included with openjpa. I have been using jdbc4 for a while without any problems (no XML however). JAXB classes use @XmlAccessorType(XmlAccessType.FIELD) everywhere - so there are getters, no setters. Do you think this could be a problem? I tried to test

Proxy of custom strategy nullifies all its fields - was: XMLValueHandler strategy not supported in Postgres?

2011-05-06 Thread Krzysztof
line: 223 EntityManagerImpl.find(Class, Object) line: 478 I will create Jira but this is quite urgent so would appreciate any suggestions.. Best regards, Krzysztof -- View this message in context: http://openjpa.208410.n2.nabble.com/XMLValueHandler-strategy-not-supported-in-Postgres-tp6331286p633

Re: XMLValueHandler strategy not supported in Postgres?

2011-05-04 Thread Krzysztof
(Types.SQLXML); // new, otherwise CLOB is picked up. return new Column[]{ col }; } I'm not sure how generic is this though. XML is stored and reconstructed JAXB objects look ok now. Krzysztof -- View this message in context: http://openjpa.208410.n2.nabble.com/XMLValueHa

XMLValueHandler strategy not supported in Postgres?

2011-05-04 Thread Krzysztof
.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:155) ... 41 more Best regards, Krzysztof -- View this message in context: http://openjpa.208410.n2.nabble.com/XMLValueHandler-strategy-not-supported-in-Postgres-tp6331286p6331286.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: @Lob and custom serialization

2011-03-17 Thread Krzysztof
Hey Milosz, Thanks for the good hint (as usual). Fair enough: I'll dig into DBDictionary, this should be the easiest way. Cheers, Krzysztof -- View this message in context: http://openjpa.208410.n2.nabble.com/Lob-and-custom-serialization-tp6180405p6180782.html Sent from the OpenJPA

@Lob and custom serialization

2011-03-17 Thread Krzysztof
is harder to integrate with SynchronizeMappings, correct? Best regards, Krzysztof -- View this message in context: http://openjpa.208410.n2.nabble.com/Lob-and-custom-serialization-tp6180405p6180405.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: 2.1.0 from maven repository woes

2011-03-03 Thread Krzysztof
Yes, I've been using build time enhancement - runtime was there for fast prototyping in rare cases build time enhancement did not run for whatever reason. I removed it as you suggested to be consistent always. Thanks! Krzysztof -- View this message in context: http://openjpa.208410.n2.nabbl

Re: 2.1.0 from maven repository woes

2011-03-03 Thread Krzysztof
this sequence definition before successfully, I had impression. Best regards, Krzysztof -- View this message in context: http://openjpa.208410.n2.nabble.com/2-1-0-jars-from-maven-repository-cause-EntityManagerFactory-initialisation-problems-tp6077834p6084069.html Sent from the OpenJPA User

2.1.0 from maven repository woes

2011-03-01 Thread Krzysztof
ce.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:152) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:72) Best regards, Krzysztof -- View this

Custom strategies are not possible for primitive array types?

2010-06-08 Thread Krzysztof
E") }) private double tdouble[]; then enhancer accepts it. Schema synchronisation creates wrong DDL suppressing given SQL type and mapping it to SQL keyword ARRAY in the external table. Does this rather simple requirement is not covered by openJPA? Would be grateful for any hints, comm

Re: ApplicationIdTool generated idclass and tokenizer inconsistency

2010-03-15 Thread Krzysztof
Hello Milosz, Thanks for the answer. Will create a JIRA issue for this. Cheers, Pozdrawiam, Krzysztof -- View this message in context: http://n2.nabble.com/ApplicationIdTool-generated-idclass-and-tokenizer-inconsistency-tp4639509p4735889.html Sent from the OpenJPA Users mailing list archive at

Re: ApplicationIdTool generated idclass and tokenizer inconsistency

2010-03-01 Thread Krzysztof
Hello, Should I open an issue for this? Best regards, Krzysztof -- View this message in context: http://n2.nabble.com/ApplicationIdTool-generated-idclass-and-tokenizer-inconsistency-tp4639509p4653214.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

ApplicationIdTool generated idclass and tokenizer inconsistency

2010-02-26 Thread Krzysztof
nt/attachment and have been wondering if this inconsistency may have other impact during an object lifecycle. The solution would be to pass full remaining part of the string and return the last position for subsequent tokens extraction somehow. Could you please confim this is a bug or a no-iss

Re: SQL_ARRAY support, primitive arrays native mapping.

2009-12-21 Thread Krzysztof
using advertised OpenJpa extensibility, does not it? Best regards, Krzysztof Krzysztof wrote: > > Hello, > I am inclined to add full support of mapping primitive arrays onto native > DB arrays (Postgres first, then maybe for Oracle). > > We would like to run SQL aggregations on a

SQL_ARRAY support, primitive arrays native mapping.

2009-12-17 Thread Krzysztof
add schema synchronisation? Some generic example in the documentation would be a real helper. Best regards, Krzysztof -- View this message in context: http://n2.nabble.com/SQL-ARRAY-support-primitive-arrays-native-mapping-tp4182645p4182645.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Enum as a Key in a Map

2009-08-20 Thread Krzysztof
Big thanks Fay! Will it be included in the tomorrows snapshot in maven repository? - I am not sure about the repository update policy - is it a nightly build version there, isn't it? It would simplify deployment in our test environment. Best regards, Krzysztof Fay Wang wrote: > > h

Re: Enum as a Key in a Map

2009-08-19 Thread Krzysztof
Thank you Fay, Probably ApplicationIdTool could be updated as well - it actually creates some code for such cases, but not digestible by the compiler. Best regards, Krzysztof Fay Wang wrote: > > Hi Krzysztof, > This is a generic problem in openjpa. If an entity, say EntityA,

Re: Enum as a Key in a Map

2009-08-19 Thread Krzysztof
Thank you, I just tried to add Id class to the enum as a dirty hack but it's not doable of course. Good luck! Krzysztof Fay Wang wrote: > > Hi Krzysztof, > Given your description below, I am able to reproduce this problem. I > will take a look at it. Thanks! &g

Re: Enum as a Key in a Map

2009-08-19 Thread Krzysztof
SType)((ObjectId)fieldsupplier.fetchObjectField(2 + i)).getId(); for some reason enum is treated as a composite Id and cast to ObjectId fails? Cheers, Krzysztof Kevin Sutter wrote: > > Hi Krzysztof, > The MapKeyEnumerated support was introduced as part of JPA 2.0. It looks > like this

Re: Enum as a Key in a Map

2009-08-19 Thread Krzysztof
directly mapped (no join table), bidirectional Map? Anybody with a workaround? Best regards, Krzysztof Krzysztof wrote: > > Indeed, changing the map to be keyed on a plain type does not solve the > problem until the owning 'source' field becomes plain type too. > So, &g

Re: Key and Value limitations in a Map

2009-08-19 Thread Krzysztof
posted here. Cheers, Krzysztof Fay Wang wrote: > > Hi Krzysztof, > The exception reported in JIRA-291 is apparently different from the > exception that you reported: > > [java] Caused by: error> org.apache.openjpa.util.MetaDataException: Field > "DerivedTS.par

Re: Key and Value limitations in a Map

2009-08-19 Thread Krzysztof
ed in a single query. Cheers Krzysztof Fay Wang wrote: > > Hi, >Can you try making AbstractModel an Entity instead of > MappedSuperClass, and making this class a concrete class as shown below? > > // abstract class that has common identity and some additional fields,

Key and Value limitations in a Map

2009-08-05 Thread Krzysztof
2106 fmds[i])); Does it mean Composite IDs are banned in Map's Key completely? Best regards, Krzysztof -- View this message in context: http://n2.nabble.com/Key-and-Value-limitations-in-a-Map%3CKey%2CValue%3E-tp3393262p3393262.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Enum as a Key in a Map

2008-12-10 Thread Krzysztof
ffects a lot of code. Could you please suggest any workaround so enum could be used as a key and is compatible with ObjectId? Annotating enum as Embeddable gives enhancer error and creating class wrapping an enum is also questionable in this particular case. Best regards, Krzysztof -- View this message

Enum as a Key in a Map

2008-12-10 Thread Krzysztof Nienartowicz
Hello, While trying to use enumeration as a key in a persistent map I fail at various stages - either at enhance-time or runtime. Is enumeration a valid key type? i.e.: public enum TSType implements java.io.Serializable { G, BP, RP, SM, RVS, RADIAL_VELOCITY, BPmRP,