2016-06-25 85 views
1

我試圖添加實體「博客」與關係一對一的新鮮jhipster的項目,但沒有結果,jhipster發電機沒有添加實體「博客」到我的項目「yo jhipster:entity」與一對一的關係不會創建實體

$ yo jhipster:entity blog 

The entity blog is being created. 


    Generating field #1 

? Do you want to add a field to your entity? Yes 
? What is the name of your field? name 
? What is the type of your field? String 
? Do you want to add validation rules to your field? No 

================= Blog ================= 
Fields 
name (String) 


Generating field #2 

? Do you want to add a field to your entity? No 

================= Blog ================= 
Fields 
name (String) 


Generating relationships to other entities 

? Do you want to add a relationship to another entity? Yes 
? What is the name of the other entity? user 
? What is the name of the relationship? user 
? What is the type of the relationship? one-to-one 
? Is this entity the owner of the relationship? Yes 
? When you display this relationship with AngularJS, which field from 'user' do you want to use? id 
? Do you want to add any validation rules to this relationship? No 

================= Blog ================= 
Fields 
name (String) 

Relationships 
user (User) one-to-one 


Generating relationships to other entities 

? Do you want to add a relationship to another entity? No 

================= Blog ================= 
Fields 
name (String) 

Relationships 
user (User) one-to-one 



? Do you want to use a Data Transfer Object (DTO)? No, use the entity directly 
? Do you want to use separate service class for your business logic? No, the REST controller should use the repository directly 
? Do you want pagination on your entity? No 

Everything is configured, generating the entity... 
$ 

沒有錯誤消息,什麼都沒有。 我試圖通過JDL添加相同的實體 - 相同的結果。

$ yo jhipster:import-jdl jhipster-jdl.jh 
The jdl is being imported. 
$ 

文件jhipster-jdl.jh:

entity Blog { 
    name String 
} 

relationship OneToOne { 
    Blog{User} to User 
} 

版本JHipster發電機v3.4.2

解決此問題 - 讓2步:

  1. 沒有任何關係創建實體
  2. 添加所需關係一對一
+0

你期待什麼結果呢? –

+0

我希望jhipster生成器能夠將我的實體「博客」添加到項目中,但事實並非如此。 – Seit

+0

我已經轉載了它,它像一個迴歸,請在github上發佈一個問題。 –

回答

相關問題