[Hibernate-JIRA] Created: (HSHARDS-57) For a better "virtual shards" support!
by Colbert Philippe (JIRA)
For a better "virtual shards" support!
--------------------------------------
Key: HSHARDS-57
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-57
Project: Hibernate Shards
Issue Type: Improvement
Affects Versions: 3.0.0.Beta2
Environment: Windows XP
Reporter: Colbert Philippe
Assignee: Max Ross
The current implementation of virtual shards leaves a lot to be desired when used in big corporate applications.
A better way to model shards, is to identify a virtual shard by a pairing of "some name" + "an index" (example: Clients, 11). The name plays a role similar to namespaces. The index is always zero based and valid only within the namespace. There can be many shard namespaces with unique names. A configuration file (possibly XML) will map each virtual shard to a single physical shard. It's a simple mapping strategy. The mapping can allow overlaps of virtual shards into a single physical shard. This type of naming can make things more clear and easier to manage on the long-run.
The big advantage to virtual shards over physical shards is that virtual shards can be easily persisted to file or database and retrieved again and still remain valid. Any change to the shard structure is fully controlled by the shard configuration file, without modifications to the persisted representation of the shard. This way the code can evolve separately from the physical shard architecture.
With this kind of virtual shard, top-of-tree classes will map to a single shard namespace. The object will reside in any of the virtual shard indexes associated with the shard namespace. The resolution strategy becomes very simple because the set of shard indexes will be returned.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[Hibernate-JIRA] Created: (HHH-3464) SimpleExpression.ignoreCase uses SQL server lowercase function for left part and JAVA lowercase function for right part of expression
by Vitaliy Tymchyshyn (JIRA)
SimpleExpression.ignoreCase uses SQL server lowercase function for left part and JAVA lowercase function for right part of expression
-------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-3464
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3464
Project: Hibernate3
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.2.6
Environment: tried with PostgreSQL
Reporter: Vitaliy Tymchyshyn
Priority: Minor
When using SimpleExpression.ignoreCase (e.g. Restrictions.eq().ignoreCase, hibernate makes 'lower(field)=?' SQL expression, passing lowercased strings to '?' parameter. This may produce unpredictable results depending on Database server lower implementation and current JAVA locale (see JDK javadoc).
For example, I've tried with '\u0130' character as in JDK JavaDoc.
Postgresql produces:
unhappy=> select lower('İ');
lower
-------
i̇
(1 row)
unhappy=> select char_length(lower('İ'));
char_length
-------------
2
(1 row)
While Java with default locale produces single-character 'i̇'. Of course the restriction will not work - it can not find 'İ' in database.
I'd recommend to use 'lower(field)=lower(?)' to use same lower casing function for both parts of expression.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months