小编efi*_*rat的帖子

HQL Left Outer以一对一的关系连接空列

左外连接应该从左表中获取所有数据,无论是否存在来自B表的匹配记录,但是如果左表right_id列为空,则不能获得记录.

我正在解释更多

在Data model:Order.java中,它是我的LEFT表,有一对一的关系

@OneToOne(targetEntity = OrderShippingDetail.class, optional=true, cascade = {CascadeType.ALL})
@JoinColumn(name = "SHIPPING_DETAIL_ID", referencedColumnName = "ID")
private OrderShippingDetail shippingDetail;
Run Code Online (Sandbox Code Playgroud)

和HQL是:

    hql = "SELECT " +
            "o.id as id, " +
            "o.createTime as createTime, " +
            "o.customerEmailAddress as customerEmailAddress, " +
            "o.customerPhoneNumber as customerPhoneNumber, " +
            "o.customerNote as customerNote, " +
            "o.invoicePrintedFlag as invoicePrintedFlag, " +
            "shippingAddress.address.personName as shippingPersonName, " +
            "shippingDetail.shippingCompany.id as shippingCompanyId, "+
            "shippingDetail.shippingCompany.name as shippingCompanyName, "+
            "shippingDetail.receiptNumber as shippingReceiptNumber, "+
            "shippingDetail.trackingNumber as shippingTrackingNumber, "+
            "shippingDetail.price as shippingPrice, …
Run Code Online (Sandbox Code Playgroud)

java hibernate hql left-join

6
推荐指数
1
解决办法
2万
查看次数

SharpPDF在Serverside asp .Net C#中创建PDF

我有样本来创建PDF,但是对于服务器端创建PDF,没有关于SharpPDF的文档.我认为这是关于流概念,我没有关于它的信息.

pdfDocument myDoc = new pdfDocument("TUTORIAL", "ME");
pdfPage myPage = myDoc.addPage();

myPage.addText("Hello World!", 200, 450, sharpPDF.Enumerators.predefinedFont.csHelvetica, 12);
myDoc.createPDF(@"c:\test.pdf");
myDoc.
myPage = null;
myDoc = null; 
Run Code Online (Sandbox Code Playgroud)

c# asp.net server-side sharppdf

3
推荐指数
1
解决办法
2609
查看次数

Spring&Hibernate,找到位,预期为TINYINT(1)DEFAULT 0

在数据库中:存在一个字段,其类型为TINYINT(1),默认值为0。在Model中,其定义为TINYINT(1)DEFAULT0。但是,它给出如下错误:

错误

[jar:file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/NetaCommerceFrameworkAdmin/WEB-INF/lib/NetaCommerceFramework-0.0.1-SNAPSHOT.jar!/com/netasoft/commerce/framework/lang/dao/LangDaoImpl.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type 
[org.hibernate.SessionFactory]: :Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/admin-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Wrong column type in kaft.nc_alert_log for column alerted. Found: bit, expected: TINYINT(1) DEFAULT 0; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/admin-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Wrong column type in kaft.nc_alert_log for column …
Run Code Online (Sandbox Code Playgroud)

spring hibernate columnmappings

2
推荐指数
1
解决办法
6363
查看次数