I love you ! 讲的非常好,谢谢老师,如果能加上类似的mappedBy=“x”的x是来自哪里的这种解释,就更加清楚明了了,学了xml配置,再来学annatation,如虎添翼,再次谢谢老师
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().configure().build();
Metadata metadata = new MetadataSources(serviceRegistry).buildMetadata();
SchemaExport schemaExport = new SchemaExport();
schemaExport.create(EnumSet.of(TargetType.DATABASE), metadata);
Metadata metadata = new MetadataSources(serviceRegistry).buildMetadata();
SchemaExport schemaExport = new SchemaExport();
schemaExport.create(EnumSet.of(TargetType.DATABASE), metadata);
2016-10-19
已采纳回答 / lsnFor
优先级:@Table>@Entity@Entity(name="student")@Table(name="students")运行结果表名为students
2016-10-18
身份证类是单独建表储存,所以是ENTITY,Embeddable注解过的类的属性是储存在主表内的,不会单独建表。
2016-10-11