如题,我使用了jbpm,他自带的有个User.hbm.xml,并且auto-import=false
我现在自己也有一个User类,但是使用的是注解方式映射的,没有xml文件,默认是auto-import=true的。
我怎样才能把它设置为false呢?谢谢各位大侠!

解决方案 »

  1.   

    http://blog.csdn.net/ysynlm/archive/2008/08/04/2766281.aspx不知道 不过捏 查询的时候使用全限定名不就好了嘛?
      

  2.   

    不行...因为jbpm中用的也是auto-import=false。
    我试了用全限定名也不行
    书上说必须要改的....
      

  3.   

    我们公司也是在用注解来映射实体 jbpm是啥我不知道 不过我用全限定名是行的 或者LZ可以从另一方面考虑 比如说有没有某个配置文件里有专门的属性 伟大的L啊 给你力量。。
      

  4.   

    用这个就可以了:@Entity(name="xxxx.xxxx.User")
    ...
    public class User {
    ....
    }
      

  5.   

    the auto-import="false" means that hibernate will use the full qualified name as the signature. So, you can add the name attribute to annotation Entity to achieve the same effect. For example: for class in example.one.Sample, you config it as Code:
    @Entity(name="example.one.Sample")
    ...
    public class Sample {
    ....
    }for class in example.two.sample, you config it as Code:
    @Entity(name="example.two.Sample")
    ...
    public class Sample {
    ....
    }
      

  6.   


    我的也是这个问题 两个media类 对应两个数据库都叫Media.java位置不同
    不过启动就报错,(try using auto-import="false")
    搜索jpa 和 auto-import未果,才发现应该用 annotation搜