Git,GitHub,TFS,Git-TFS和VisualStudio.com(Git, GitHub, TFS, Git-TFS and VisualStudio.com)
我正在使用visual studio 2015在独立电脑上开始一个项目。过去,我在团队项目中使用了TFS和Git。 我对这个新个人项目的偏好是在我的本地机器上使用Git和TFS一起使用; 这也安装在我的电脑上。
我的代码将是专有的,我不希望它托管在GitHub或VisualStudio.com上,无论它们的安全功能有多么强大。 我应该如何去建立这样的环境? Git-TFS是答案吗?
I am starting a project on my stand-alone pc using visual studio 2015. In the past, I have used TFS and Git in team projects. My preference for this new personal project is to use Git on my local machine in conjunction with TFS; which is also installed on my pc.
My code will be proprietary, and I do not want it hosted on GitHub or VisualStudio.com regardless of how great their security features might be. How should I go about setting up an environment like that? Is Git-TFS the answer?
原文:https://stackoverflow.com/questions/39628437
最满意答案
JPA将
@GeneratedValue
定义为仅适用于PK字段。 DataNucleus在任何领域接受它。 显然这超出了JPA规范,其他实现可能不支持这种行为。JPA defines
@GeneratedValue
to apply to just PK fields. DataNucleus accepts it on any field. Obviously that is beyond the JPA spec and other implementations may not support such behaviour.
相关问答
更多-
检查最新的学说文件 这里是一个总结:可能的生成策略列表: AUTO(默认) :指示Doctrine选择所用数据库平台所偏好的策略。 首选的策略是MySQL,SQLite和MsSQL的IDENTITY以及Oracle和PostgreSQL的SEQUENCE 。 该策略提供了完全的可移植性。 SEQUENCE:指示Doctrine使用数据库序列生成ID 。 这个策略目前不提供完整的可移植性。 序列由Oracle和PostgreSql支持。 IDENTITY:告诉Doctrine在数据库中使用特殊标识列,以便在插 ...
-
不是自动生成策略意味着提供者(在这种情况下为hibernate)会自动选择正确的方法并根据需要进行所有繁重的工作(创建序列,使用本机方法还是适用于特定平台的任何工具)? 我的理解不正确? 它在理论上(它默认使用HSQLDB的IDENTITY),它适用于我。 这引出了以下问题: 你用什么方言(以防万一)? 你是如何制作桌子的? 你可以显示DDL(如果需要,激活org.hibernate.tool.hbm2ddl的日志记录)? 你如何插入(通过Hibernate的API,对吧?)? 以下是使用HSQLDB时实体 ...
-
@GeneratedValue注释(@GeneratedValue annotation)[2022-10-21]
如果您不希望让您的JPA提供程序在创建对象时为您生成密钥,但只希望在数据库创建时确保它保持更新,并且正在使用Hibernate:您可以使用@org.hibernate.annotations.Generated注释: The annotated property is generated by the database. 根据类似问题的这个答案它看起来不像是有一种简单的方法让你的JPA为你产生价值。 If you are not interested in having your JPA provider ... -
@EmbeddedId与@Gembeddable中的@GeneratedValue(@EmbeddedId with @GeneratedValue in @Embeddable)[2022-07-30]
您的JPA @Id不需要匹配数据库PK列。 只要它是唯一的,那就重要了,因为相关的列是一个自动增量列,那么情况就是如此。 来自https://en.wikibooks.org/wiki/Java_Persistence/Identity_and_Sequencing : JPA Id并不总是必须匹配数据库表主键约束,也不需要主键或唯一约束。 因此,虽然关联表的PK可以配置为PRIMARY KEY (id_operation, id_menu) ,但看起来, id_operation通过自动递增,可以单独作为 ... -
在不明白你的意思是“用j1_前缀PK ID字段,后跟基础36中的唯一ID”......但无论如何:当然你可以使用任何字段类型(包括你自己的custem字段类型)你想要作为主键 - 您只需将其指定为主键,参见精细手册 。 In don't understand what you mean by "Prefix the PK ID field with j1_, followed by a unique ID in base 36"... But anyway: of course you can use wh ...
-
在PostgreSQL中,自动增量是使用SERIAL伪类型处理的。 您在执行CREATE TABLE时使用此类型。 现在到了这一点 - 这个SERIAL伪类型创建一个序列。 PostgreSQL自动增量使用创建的序列进行处理。 id列的默认值为 - nextval('your_sequence_name') 。 在User实体的Hibernate中: @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "users_seq_ ...
-
JPA将@GeneratedValue定义为仅适用于PK字段。 DataNucleus在任何领域接受它。 显然这超出了JPA规范,其他实现可能不支持这种行为。 JPA defines @GeneratedValue to apply to just PK fields. DataNucleus accepts it on any field. Obviously that is beyond the JPA spec and other implementations may not support suc ...
-
您使用的是哪种版本的tastypie? 0.9.11使用override_urls而0.9.12(beta)引入了prepend_urls而且两个版本的cookbook不同。 您仍然可以使用0.9.11。 请参阅: http : //django-tastypie.readthedocs.org/en/v0.9.11/cookbook.html#using-non-pk-data-for-your-urls Which version of tastypie are you using? 0.9.11 us ...
-
@OneToMany(cascade = CascadeType.PERSIST) private List
proposals; 意味着Proposal实体与Group一起持久化,但未合并。 在分配和持久化Group实体之前,应单独保留其他实体。 我会尝试删除此级联属性,并检查问题是否仍然存在。 @OneToMany(cascade = CascadeType.PERSIST) private List proposals; Means that Propo ... -
你无法UPDATE所有列都是主键的行的原因是因为Cassandra不允许你更改主键的值,因为你实际上会完全引用另一行,因为主键是一行如何是唯一标识的。 如果您希望所有列都成为主键的一部分,并且您想要更改其中一个列,则可以执行的操作是先删除现有行,然后插入新数据。 由于您需要所有列进行任何更改(因为它们都创建主键)使用INSERT而不是UPDATE是正常的: DELETE FROM items_ids_by_field1_and_field2 where field1='X' and field2='Y' a ...