使用嵌入式数据库测试我的应用程序时出现以下错误:
java.sql.SQLException:架构名称无效:DOMAININSC1 _
我正在尝试的查询是:
SELECT distinct d FROM DomainDO d left join fetch d.domainInscriptionProduct WHERE d.id IN (:listIds)
DomainDO具有以下关系:
@Entity
@Table(name = "Domain_Registry")
public class DomainDO {
[...]
@OneToMany(fetch = FetchType.LAZY, mappedBy = "domainId")
private Set<DomainInscriptionProductDO> domainInscriptionProduct = new HashSet<DomainInscriptionProductDO>(0);
[...]
}
Hibernate将查询转换为:
select distinct domaindo0_.idt_domain_registry as idt1_1_0_, domaininsc1_.IDT_DOMAIN_INSCRIPTION_PRODUCT as IDT1_23_1_, domaindo0_.dat_creation as dat2_1_0_, domaindo0_.idt_master_domain as idt3_1_0_, domaindo0_.dat_expiration as dat4_1_0_, domaindo0_.nam_domain_extension as nam5_1_0_, domaindo0_.IDT_DOMAIN_PROMOTION as IDT6_1_0_, domaindo0_.idt_domain_partner_extension as idt7_1_0_, domaindo0_.idt_inscription as idt8_1_0_, domaindo0_.nam_domain as nam9_1_0_, domaindo0_.idt_domain_partner as idt10_1_0_, domaindo0_.dat_registry as dat11_1_0_, domaindo0_.cod_domain_registry_status as cod12_1_0_, domaindo0_.dat_updated as dat13_1_0_, domaininsc1_.DAT_CREATION as DAT2_23_1_, domaininsc1_.IDT_DOMAIN_REGISTRY as IDT3_23_1_, domaininsc1_.IDT_INSCRIPTION as IDT4_23_1_, domaininsc1_.FLG_MASTER_DOMAIN as FLG5_23_1_, domaininsc1_.IDT_PRODUCT as IDT6_23_1_, domaininsc1_.IDT_DOMAIN_REGISTRY as IDT3_1_0__, domaininsc1_.IDT_DOMAIN_INSCRIPTION_PRODUCT as IDT1_0__ from Domain_Registry domaindo0_, DOMAIN_INSCRIPTION_PRODUCT domaininsc1_ where domaindo0_.idt_domain_registry=domaininsc1_.IDT_DOMAIN_REGISTRY(+) and (domaindo0_.idt_domain_registry in (?))
我在数据库上尝试了这个并且它正常工作,但是当使用嵌入式数据库的jUnit运行时,我收到错误。
我到处搜索,找不到类似的东西。
有人可以帮忙吗?