-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement collection type extensions #161
Comments
A PR for an array datatypes module for Hibernate has been proposed hibernate/hibernate-orm#1499 . Personally I use the array custom types provided by vladmihalcea/hibernate-types. Both implementations rely on I am also uncertain whether we should emulate array support for databases that do not. It makes this feature drastically more complicated. Not only do we have to emulate the collection storage, but also any of the collection array functions. We'd also lose valuable type information that databases with native array implementations will have. I actually toyed around with pgjdbc/pgjdbc#381 a little myself. PostgreSQL's |
The main purpose of emulating this via XML or JSON would be to reduce the amount of data that needs to be fetched when wanting to fetch collections. I don't know if we can make that happen for hibernate native collections, but the potential benefits for entity views are huge. I would like to use that as default fetch strategy for collections as it should be the most efficient way of fetching nested data. It avoids cross products and also avoids separate queries. We can make use of more efficient pagination as we don't have to handle cardinality/cross product due to collections and generally should be able to implement more efficient collection filtering due to filters being pushed into the collection aggregation. Array support in postgresql is nice to support because it has some nice filter/index performance benefits to it, so that's something I definitely want to add as a separate feature. |
In SQL 99 the array type was added which is very convenient especially when indexes are possible. There are various databases that have support for collection types in one or another way. We should take a look into that and try to implement an abstraction for that.
Regarding JDBC Support
Related issues
Also see: https://github.com/mopano/hibernate-array-type
The text was updated successfully, but these errors were encountered: