Cleanup docs, implement appendHqlString for DiscriminatorSqmPath and fix MapMember type
This commit is contained in:
parent
76bfbccbe6
commit
c16731d14a
|
@ -1,20 +1,20 @@
|
|||
create table Book (
|
||||
id bigint not null,
|
||||
author varchar(255),
|
||||
ebook_publisher_name varchar(255),
|
||||
paper_back_publisher_name varchar(255),
|
||||
ebook_pub_name varchar(255),
|
||||
paper_back_pub_name varchar(255),
|
||||
title varchar(255),
|
||||
ebook_publisher_country_id bigint,
|
||||
paper_back_publisher_country_id bigint,
|
||||
ebook_pub_country_id bigint,
|
||||
paper_back_pub_country_id bigint,
|
||||
primary key (id)
|
||||
)
|
||||
|
||||
alter table Book
|
||||
add constraint FKm39ibh5jstybnslaoojkbac2g
|
||||
foreign key (ebook_publisher_country_id)
|
||||
foreign key (ebook_pub_country_id)
|
||||
references Country
|
||||
|
||||
alter table Book
|
||||
add constraint FK7kqy9da323p7jw7wvqgs6aek7
|
||||
foreign key (paper_back_publisher_country_id)
|
||||
foreign key (paper_back_pub_country_id)
|
||||
references Country
|
|
@ -589,7 +589,10 @@ public class AttributeFactory {
|
|||
final EmbeddableDomainType<?> ownerType = (EmbeddableDomainType) attributeContext.getOwnerType();
|
||||
|
||||
if ( ownerType.getRepresentationStrategy().getMode() == RepresentationMode.MAP ) {
|
||||
return new MapMember( attributeContext.getPropertyMapping().getName(), ownerType.getExpressableJavaTypeDescriptor().getJavaTypeClass() );
|
||||
return new MapMember(
|
||||
attributeContext.getPropertyMapping().getName(),
|
||||
attributeContext.getPropertyMapping().getType().getReturnedClass()
|
||||
);
|
||||
}
|
||||
else {
|
||||
return ownerType.getRepresentationStrategy()
|
||||
|
|
|
@ -72,7 +72,9 @@ public class DiscriminatorSqmPath extends AbstractSqmPath implements SelfInterpr
|
|||
|
||||
@Override
|
||||
public void appendHqlString(StringBuilder sb) {
|
||||
// todo (6.0) : no idea
|
||||
sb.append( "type(" );
|
||||
getLhs().appendHqlString( sb );
|
||||
sb.append( ')' );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue