Skip to content

Commit

Permalink
sebersole#26 - Create AnnotationUsage for tenant-id in XML
Browse files Browse the repository at this point in the history
  • Loading branch information
dreab8 committed Nov 22, 2023
1 parent d4cefaf commit f032297
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ private static void applyTenantId(
classAccessType,
xmlDocumentContext
);
// todo : add bind-as-param attribute to @TenantId
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,33 @@
package org.hibernate.models.orm.xml.dynamic;


import java.util.Set;
import java.util.Set;


import org.hibernate.annotations.TenantId;
import org.hibernate.boot.internal.BootstrapContextImpl;
import org.hibernate.boot.internal.MetadataBuilderImpl;
import org.hibernate.boot.model.process.spi.ManagedResources;
import org.hibernate.boot.models.categorize.spi.CategorizedDomainModel;
import org.hibernate.boot.models.categorize.spi.EntityHierarchy;
import org.hibernate.boot.models.categorize.spi.EntityTypeMetadata;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.models.orm.process.ManagedResourcesImpl;
import org.hibernate.models.spi.AnnotationUsage;
import org.hibernate.models.spi.ClassDetails;
import org.hibernate.models.spi.FieldDetails;
import org.hibernate.annotations.TenantId;
import org.hibernate.boot.internal.BootstrapContextImpl;
import org.hibernate.boot.internal.MetadataBuilderImpl;
import org.hibernate.boot.model.process.spi.ManagedResources;
import org.hibernate.boot.models.categorize.spi.CategorizedDomainModel;
import org.hibernate.boot.models.categorize.spi.EntityHierarchy;
import org.hibernate.boot.models.categorize.spi.EntityTypeMetadata;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.models.orm.process.ManagedResourcesImpl;
import org.hibernate.models.spi.AnnotationUsage;
import org.hibernate.models.spi.FieldDetails;


import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Test;


import jakarta.persistence.Basic;
import jakarta.persistence.Column;
import jakarta.persistence.FetchType;
import jakarta.persistence.Basic;
import jakarta.persistence.Column;
import jakarta.persistence.FetchType;


import static org.assertj.core.api.Assertions.assertThat;
import static org.hibernate.boot.models.categorize.spi.ManagedResourcesProcessor.processManagedResources;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hibernate.boot.models.categorize.spi.ManagedResourcesProcessor.processManagedResources;


public class TenantIdTest {
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/mappings/dynamic/dynamic-tenantid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
~ Copyright: Red Hat Inc. and Hibernate Authors
-->
<entity-mappings xmlns="http://www.hibernate.org/xsd/orm/mapping"
version="3.1">
version="3.2">
<entity name="EntityWithoutTenantId" metadata-complete="true">
<attributes>
<id name="id"/>
Expand Down

0 comments on commit f032297

Please sign in to comment.