-
Notifications
You must be signed in to change notification settings - Fork 2
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
#26 Create AnnotationUsage for tenant-id in XML #62
Conversation
…bernate-models repo)
Add Action to build/test Signed-off-by: Steve Ebersole <[email protected]>
misc
…e, mapped-superclass)
Signed-off-by: Steve Ebersole <[email protected]>
Signed-off-by: Steve Ebersole <[email protected]>
sebersole#47 - Support dynamic <entity/> and <embeddable/> mappings
sebersole#47 - Support dynamic <entity/> and <embeddable/> mappings
sebersole#47 - Support dynamic <entity/> and <embeddable/> mappings
sebersole#47 - Support dynamic <entity/> and <embeddable/> mappings
…l-delete and sql-delete-all
…teners and callback methods
* General fix ups
I was consciously keeping it outside of But then again, it's on par (I'd say) with |
MutableClassDetails mutableClassDetails, | ||
AccessType classAccessType, | ||
SourceModelBuildingContext sourceModelBuildingContext) { | ||
processAttributes( attributesContainer, mutableClassDetails, classAccessType, null, sourceModelBuildingContext ); | ||
} | ||
|
||
public static void processAttributes( | ||
JaxbAttributesContainerImpl attributesContainer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I might be missing something in the diff here, but why is this only processing basic attributes and tenant-id? Why not the others?
Unless I am very confused, this all used to route through #processBaseAttributes
(base, not basic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the nameprocessBasicAttributes
is just a really bad choice I made and really misleading :(.
It really process the attributes JaxbAttributesContainerImpl
and JaxbEmbeddableAttributesContainerImpl
have in common.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So then maybe you are just calling the wrong one?
public static void processBaseAttributes(
JaxbBaseAttributesContainer attributesContainer,
MutableClassDetails mutableClassDetails,
AccessType classAccessType,
MemberAdjuster memberAdjuster,
SourceModelBuildingContext sourceModelBuildingContext) {
^^ is the one I think you are thinking of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to process the additional tenant-id
attributes that JaxbAttributesContainerImpl
has respect to JaxbEmbeddableAttributesContainerImpl
, I renamed the existing processAttributes
method into processBasicAttributes
(poor name choice) and created 2 new methodsprocessAttributes(JaxbAttributesContainerImpl attributesContainer, ...)
and processAttributes(JaxbEmbeddableAttributesContainerImpl attributesContainer, ...
in this way processAttributes(JaxbAttributesContainerImpl attributesContainer, ...)
can process the tenant-id
attribute and both methods can use the processBasicAttributes
to process all the other attributes JaxbAttributesContainerImpl
and JaxbEmbeddableAttributesContainerImpl
have in common.
Hope my explanation is not too confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed it to processAttributeContainer
but open to better suggestions
I moved the xsd and jaxb changes back to hibernate-orm (my jpa32 branch). We'll need to apply those related changes there if they still need to be. They are unfortunately the files in conflict |
#26
@sebersole I changed mapping-3.1.0.xsd and moved
<xsd:element name="tenant-id" type="orm:tenant-id" minOccurs="0" />
inside<xsd:complexType name="attributes">
, not sure if this is correct