cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony <t...@giaccone.org>
Subject Re: 回复: is is possible to dynamically create entity in cayenne?
Date Mon, 23 Jul 2018 12:46:58 GMT

Obviously you know your requirements better than anyone and maybe this is the best solution.
However, what you are describing seems like a very complicated solution.

It seems like you are going to build the equivalent of the Cayenne Data Modeler as a web app.
And then include the cayenne runtime system as well. I’m sure it’s possible but there
are many complicated use cases to model. 

For example, if your user describes a table, creates the table, and populates it with data
how will you manage the desire of the user after population of data to change a column type?
Will you just delete the data in the column in the table? What if the column is mandatory?

Once the table is instantiated in MySQL you will have to create alter table statements to
modify it. This is another complicated process.

Are you going to support foreign key relationships??

I’m sure you can get cayenne to do support the features you describe, the modeler does them,
but the consequences and complexity of this solution seems quite high.

Tony Giaccone

> On Jul 22, 2018, at 11:40 AM, 刘波 <1091643978@qq.com> wrote:
> 
> hi Andrus,
> thanks very much!
> 
> 
> I've watching your video on youtube that introduce the Cayenne framework one hour ago
this evening~
> 
> 
> I know Apache Cayenne in yesterday, and find it a very exciting framework maybe can fit
our business  requirement.
> 
> 
> We need dynamically create data table in java code at runtime, the user case is:
> 1.user define a table in web form, such as table name, columns, columns type.
> 2.then, we need to create a table according the user definition in mysql database.
> 3.user then can use CRUD action on that table, for example, save,select,update,delete,pagination,etc...
> 
> 
> I want to use cayenne with linkREST to provide a rest data api. Hope there are some advice~
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------ 原始邮件 ------------------
> 发件人: "Andrus Adamchik"<andrus@objectstyle.org>;
> 发送时间: 2018年7月22日(星期天) 晚上11:15
> 收件人: "user"<user@cayenne.apache.org>;
> 抄送: "刘波"<1091643978@qq.com>; 
> 主题: Re: is is possible to dynamically create entity in cayenne?
> 
> 
> 
> Hi there,
> 
> The short answer is that org.apache.cayenne.CayenneDataObject is that Java object that
every generic object can be mapped to. Will be happy to expand this answer if you have any
follow up questions.
> 
> (Also I noticed you are not subscribed to the list, so you may miss some replies that
are sent to the list only. Everything will be in the list archives of course).
> 
> Andrus
> 
> 
> 
>> On Jul 22, 2018, at 3:37 PM, 刘波 <1091643978@qq.com> wrote:
>> 
>> Hi users,
>> 
>> 
>> I'm new to cayenne, we face a problem recently. 
>> 
>> 
>> we want to dynamically create the table in mysql, and it's corresponding entity.
>> 
>> 
>> we find the Generic Objects, but it seems need a specified java class before.
>> 
>> 
>> Any ideas, 
>> thanks~

Mime
View raw message