Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Talk:EclipseLink/DesignDocs/340192"

Line 17: Line 17:
  
 
* We are currently not planning on supporting composite keys in relationship mappings for the first iteration of this feature.  (even 1-1 is currently listed as a SHOULD and not a MUST)  I believe we should carefully design our public API to not preclude using composite keys at a later day, but other than that, should not necessarily include composite key support in our initial design. --[[User:Tom.ware.oracle.com|Tom.ware.oracle.com]] 18:19, 28 March 2011 (UTC)
 
* We are currently not planning on supporting composite keys in relationship mappings for the first iteration of this feature.  (even 1-1 is currently listed as a SHOULD and not a MUST)  I believe we should carefully design our public API to not preclude using composite keys at a later day, but other than that, should not necessarily include composite key support in our initial design. --[[User:Tom.ware.oracle.com|Tom.ware.oracle.com]] 18:19, 28 March 2011 (UTC)
 +
 +
===Overview===
 +
I think the document needs an overview discussion the types of applications we intend to support and why they need this extension.
 +
In terms of the existing table having extra columns, would it not be significantly simpler for the user to just add extra fields to their class mapped to these extra columns?  What benefit do users get from our Flex support?
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)
 +
 +
===OneToOne===
 +
Not exactly sure how this will work, and would seem to need a lot more flexibility to really work.  How can a VARCHAR field be a foreign key to a NUMERIC column?  Also issues with composite ids, cascading, fetching, etc.  We should probably not add support for OneToOne until we are will to do it properly, and probably support any mapping type.
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)
 +
 +
===FlexExtensions===
 +
Seems like this annotation should be defined on the class and named similar to sequences and referenced from the Map (@Flex(name="default-flex")).
 +
This would save the user from having to add the same annotation to every class.
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)
 +
 +
createNonExistingColumns is kind of complex, what about just alterTable.
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)
 +
 +
extensionTableName should probably be an @Table to allow qualifier, constraints, etc.
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)
 +
 +
JpaHelper API - is this required?  Why not just have getExtensionsManager on JpaEntityManager or Factory (probably JpaEntityManager as you cannot unwrap the factory is JEE).  Didn't the JPA 2.0 unwrap API obsolete JpaHelper?
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)
 +
 +
TYPE - Cannot use reserved word as a column name.
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)
 +
 +
===Descriptor Initialization===
 +
How do you intend to add new mappings to a descriptor at runtime?  How will the descriptor be reinitialized, how will the SQL for existing query be regenerated?  What happens to concurrent threads accessed the descriptor as the new mappings are being added?  What about the existing cached objects, how do they get the new data?
 +
:[[User:James.sutherland.oracle.com|James.sutherland.oracle.com]] 18:50, 31 March 2011 (UTC)

Revision as of 14:50, 31 March 2011

The EXTENSION_DEF has no way of matching rows to fields in the Customer table.

EXTENSION_DEF requires a field to store the referenced field name (in the flexfield case). This allows custom naming to be used, and ensures the EXTENSION_DEF rows match up consistently to the same fields. It also makes the sequence id field unnecessary, as the ENT_NAME and this fieldName reference would uniquely identify it.



ExtensionProperties will also need a way to represent multiple fields - such as a 1:1 to an entity with composite foreign keys. Either the ExtensionProperty will need to represent multiple rows in the EXTENSION_DEF table, to be more along the lines of what a mapping is in EclipseLink, or addExtension potentially result in creating multiple ExtensionProperties.

If an extension has multiple ExtensionProperties, this can easily be contained in a map keyed on the extension name, with a collection of ExtensionProperties as the value.

  • We are currently not planning on supporting composite keys in relationship mappings for the first iteration of this feature. (even 1-1 is currently listed as a SHOULD and not a MUST) I believe we should carefully design our public API to not preclude using composite keys at a later day, but other than that, should not necessarily include composite key support in our initial design. --Tom.ware.oracle.com 18:19, 28 March 2011 (UTC)

Overview

I think the document needs an overview discussion the types of applications we intend to support and why they need this extension. In terms of the existing table having extra columns, would it not be significantly simpler for the user to just add extra fields to their class mapped to these extra columns? What benefit do users get from our Flex support?

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

OneToOne

Not exactly sure how this will work, and would seem to need a lot more flexibility to really work. How can a VARCHAR field be a foreign key to a NUMERIC column? Also issues with composite ids, cascading, fetching, etc. We should probably not add support for OneToOne until we are will to do it properly, and probably support any mapping type.

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

FlexExtensions

Seems like this annotation should be defined on the class and named similar to sequences and referenced from the Map (@Flex(name="default-flex")). This would save the user from having to add the same annotation to every class.

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

createNonExistingColumns is kind of complex, what about just alterTable.

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

extensionTableName should probably be an @Table to allow qualifier, constraints, etc.

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

JpaHelper API - is this required? Why not just have getExtensionsManager on JpaEntityManager or Factory (probably JpaEntityManager as you cannot unwrap the factory is JEE). Didn't the JPA 2.0 unwrap API obsolete JpaHelper?

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

TYPE - Cannot use reserved word as a column name.

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

Descriptor Initialization

How do you intend to add new mappings to a descriptor at runtime? How will the descriptor be reinitialized, how will the SQL for existing query be regenerated? What happens to concurrent threads accessed the descriptor as the new mappings are being added? What about the existing cached objects, how do they get the new data?

James.sutherland.oracle.com 18:50, 31 March 2011 (UTC)

Back to the top