|
JPA TestCase for MultiTenancy
Hi,
As you can see on other topics, I'm facing some difficulties with MultiTenancy in JPA. I haven't diagnose yet why settings are not applied but I translated the JDO TestCase to JPA.
These tests
Hi,
As you can see on other topics, I'm facing some difficulties with MultiTenancy in JPA. I haven't diagnose yet why settings are not applied but I translated the JDO TestCase to JPA.
These tests
|
By
passignat@...
·
#306
·
|
|
Re: Error when using the jdbcType NVARCHAR with H2
Ok, thanks Andy!
Will change the local type as suggested.
Ok, thanks Andy!
Will change the local type as suggested.
|
By
mwhesse@...
·
#305
·
|
|
Re: Error when using the jdbcType NVARCHAR with H2
"Actually JDBC metadata is not a reliable source of information in all or almost all drivers, don't trust it."
Says much, about the attitude in the "database community" to a standard that was intended
"Actually JDBC metadata is not a reliable source of information in all or almost all drivers, don't trust it."
Says much, about the attitude in the "database community" to a standard that was intended
|
By
Andy
·
#304
·
Edited
|
|
Re: Multi Tenancy : find fails with a NPE on DN 2.5.6
Using properties.setProperty(PropertyNames.PROPERTY_MAPPING_TENANT_PROVIDER,MyTenantProvider.class.getName()) raises an error
WARN Error accessing property datanucleus.TenantProvider; should be an
Using properties.setProperty(PropertyNames.PROPERTY_MAPPING_TENANT_PROVIDER,MyTenantProvider.class.getName()) raises an error
WARN Error accessing property datanucleus.TenantProvider; should be an
|
By
passignat@...
·
#303
·
|
|
Re: Error when using the jdbcType NVARCHAR with H2
Interesting outcome in the discussion with Evgenij, H2 accepts NVARCHAR but doesn't directly support it. You can use it in H2 DDL though, will just be converted to VARCHAR.
Wondering if it would be
Interesting outcome in the discussion with Evgenij, H2 accepts NVARCHAR but doesn't directly support it. You can use it in H2 DDL though, will just be converted to VARCHAR.
Wondering if it would be
|
By
mwhesse@...
·
#302
·
|
|
Re: Error when using the jdbcType NVARCHAR with H2
Thanks for your support, below works for us.
SQLTypeInfo sqlType = new H2TypeInfo(
"NVARCHAR", // String typeName
(short)Types.NVARCHAR, // short dataType
2147483647, // int
Thanks for your support, below works for us.
SQLTypeInfo sqlType = new H2TypeInfo(
"NVARCHAR", // String typeName
(short)Types.NVARCHAR, // short dataType
2147483647, // int
|
By
mwhesse@...
·
#301
·
|
|
Re: Error when using the jdbcType NVARCHAR with H2
A committer on the H2 project suggested that "Actually JDBC metadata is not a reliable source of information in all or almost all drivers, don't trust it.". [1]
Maybe the person is right and we should
A committer on the H2 project suggested that "Actually JDBC metadata is not a reliable source of information in all or almost all drivers, don't trust it.". [1]
Maybe the person is right and we should
|
By
mwhesse@...
·
#300
·
|
|
Re: Multi Tenancy : find fails with a NPE on DN 2.5.6
Unable to set the multitenant properties (on current source):
props.put(PropertyNames.PROPERTY_MAPPING_TENANT_READ_IDS, tenant);
props.put(PropertyNames.PROPERTY_MAPPING_TENANT_ID, tenant);
final
Unable to set the multitenant properties (on current source):
props.put(PropertyNames.PROPERTY_MAPPING_TENANT_READ_IDS, tenant);
props.put(PropertyNames.PROPERTY_MAPPING_TENANT_ID, tenant);
final
|
By
passignat@...
·
#299
·
|
|
Re: Error when using the jdbcType NVARCHAR with H2
Yes H2 does indeed claim support for NVARCHAR:
https://h2database.com/html/datatypes.html?highlight=NVARCHAR&search=NVARCHAR#varchar_type
But it fails to expose it via it's JDBC driver as supported
Yes H2 does indeed claim support for NVARCHAR:
https://h2database.com/html/datatypes.html?highlight=NVARCHAR&search=NVARCHAR#varchar_type
But it fails to expose it via it's JDBC driver as supported
|
By
mwhesse@...
·
#297
·
|
|
Re: Error when using the jdbcType NVARCHAR with H2
So does H2 actually claim to support "NVARCHAR" ? By that I mean in its response to DatabaseMetadata.getTypeInfo()?
You can easily run DataNucleus SchemaTool in "dbinfo" mode, and get output like the
So does H2 actually claim to support "NVARCHAR" ? By that I mean in its response to DatabaseMetadata.getTypeInfo()?
You can easily run DataNucleus SchemaTool in "dbinfo" mode, and get output like the
|
By
Andy
·
#296
·
|
|
Re: Breaking change in CLOB columns in PostgreSQL coming from DN 5.2.2
Hi,
Define what you had before and what you have now.
Was the String field stored in a CLOB column (defined in the generated DDL as "CLOB") ? and presumably it was previously read/written using
Hi,
Define what you had before and what you have now.
Was the String field stored in a CLOB column (defined in the generated DDL as "CLOB") ? and presumably it was previously read/written using
|
By
Andy
·
#295
·
Edited
|
|
Re: Multi Tenancy : find fails with a NPE on DN 2.5.6
On Sat, Feb 27, 2021 at 01:22 AM, <passignat@...> wrote:
multiTenancyProvider
Case: https://github.com/datanucleus/datanucleus-core/issues/365
I think it's available in this fix
DN Version:
On Sat, Feb 27, 2021 at 01:22 AM, <passignat@...> wrote:
multiTenancyProvider
Case: https://github.com/datanucleus/datanucleus-core/issues/365
I think it's available in this fix
DN Version:
|
By
passignat@...
·
#294
·
Edited
|
|
Error when using the jdbcType NVARCHAR with H2
When mapping a column with java type String and using jdbcType="NVARCHAR" in the @Column annotation we receive an error that the type is not supported by our H2 datastore.
We looked at the H2Adapter
When mapping a column with java type String and using jdbcType="NVARCHAR" in the @Column annotation we receive an error that the type is not supported by our H2 datastore.
We looked at the H2Adapter
|
By
mwhesse@...
·
#293
·
|
|
Breaking change in CLOB columns in PostgreSQL coming from DN 5.2.2
Hi,
I'm using Dependency-Track with PostgreSQL, which is built on DN. Dependency-Track recently switched from DN 5.2.2 to DN 5.2.6, making data in String fields annotated as CLOB inaccessible when
Hi,
I'm using Dependency-Track with PostgreSQL, which is built on DN. Dependency-Track recently switched from DN 5.2.2 to DN 5.2.6, making data in String fields annotated as CLOB inaccessible when
|
By
keil@...
·
#292
·
|
|
Re: JPA PreUpdate fired "without" changes
User makes changes when an object is detached. The persistence provider is not involved in the process when the object is detached. The dirty flag is then set on ALL fields that have their setters
User makes changes when an object is detached. The persistence provider is not involved in the process when the object is detached. The dirty flag is then set on ALL fields that have their setters
|
By
Andy
·
#291
·
Edited
|
|
Multi Tenancy : find fails with a NPE on DN 2.5.6
I'm trying to use datanucleus.TenantReadIds at the EntityManager level, setting this property entityManager.setProperty(PropertyNames.PROPERTY_MAPPING_TENANT_READ_IDS, tenant);
As it doesn't seems
I'm trying to use datanucleus.TenantReadIds at the EntityManager level, setting this property entityManager.setProperty(PropertyNames.PROPERTY_MAPPING_TENANT_READ_IDS, tenant);
As it doesn't seems
|
By
passignat@...
·
#290
·
|
|
Multi Tenancy : find fails with a NPE on DN 2.5.6
Hi,
I'm testing datanucleus.TenantReadIds and receive a NullPointerException
PersistenceNucleusContextImpl:getMultiTenancyReadIds line 1928 return new String[]
Hi,
I'm testing datanucleus.TenantReadIds and receive a NullPointerException
PersistenceNucleusContextImpl:getMultiTenancyReadIds line 1928 return new String[]
|
By
passignat@...
·
#289
·
|
|
Re: JPA PreUpdate fired "without" changes
Please use this attachment.
Failing tests:
testUpdateNoChangeDetach
testUpdateNoChangeCopy
Workaround for simple situation:
testUpdateNoChangeApply
--
Stephane
Please use this attachment.
Failing tests:
testUpdateNoChangeDetach
testUpdateNoChangeCopy
Workaround for simple situation:
testUpdateNoChangeApply
--
Stephane
|
By
passignat@...
·
#288
·
Edited
|
|
Re: JPA PreUpdate fired "without" changes
Hi Andy,
my issue seems related to the merge operation. I attached a junit testcase.
thanks
--
Stephane
Hi Andy,
my issue seems related to the merge operation. I attached a junit testcase.
thanks
--
Stephane
|
By
passignat@...
·
#286
·
|
|
Re: JPA PreUpdate fired "without" changes
An object is not "made dirty" when setting a field to the same value ... except if the value is a floating point / double (aka imprecise) value.
NucleusJPAHelper.getObjectState(obj) defines the state
An object is not "made dirty" when setting a field to the same value ... except if the value is a floating point / double (aka imprecise) value.
NucleusJPAHelper.getObjectState(obj) defines the state
|
By
Andy
·
#285
·
Edited
|