You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Zissis Trabaris <z....@insysware.com> on 2010/01/16 19:47:06 UTC

Index modeling

Are there any plans to add DB index definitions and generation in the
DBEntities in the near future? We are currently managing these outside
of the Cayenne xml and using SQLTemplates to generate them when I sync
the models to the DB. It would be nice if we don't have to maintain that
code if Cayenne would handle it for us.

 

Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West River
Road, Grand Island, New York, 14072, USA 
Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716) 625-1305 *
z.trabaris@insysware.com <ma...@insysware.com>  *
www.insysware.com <http://www.insysware.com/>  

________________________________

CONFIDENTIALITY: This email (including any attachments) may contain
confidential, proprietary and privileged information, and unauthorized
disclosure or use is prohibited. If you received this email in error,
please notify the sender and delete this email from your system. Thank
you. 

 


Re: Index modeling

Posted by Andrus Adamchik <an...@objectstyle.org>.
Cool. I expect the Modeler support won't be an issue. Once everything  
else is done, this can be picked up by other committers.

BTW, one pretty serious obstacle for turning indexes into first class  
citizens in Cayenne DB metadata is the fact that JDBC does not provide  
any means for reverse-engineering indexes in a DB-independent manner.  
So the only way to load a model with indexes from an existing DB is to  
extend DbAdapter with custom DB SQL for each DB to read indexes. I  
suggest researching this issue first before doing any other work.

Andrus


On Jan 17, 2010, at 7:24 PM, Zissis Trabaris wrote:

> I think I could get it cleanly added to Cayenne 3.1. I would probably
> have to upgrade the DBMerger, LoaderDeligate, DBLoader, DBEntity,  
> create
> a MergerToken, and possibly upgrade DBAdapter. Someone else would have
> to upgrade the modeler since I am not up to speed with that code. I  
> then
> would be able to contribute the changes back into the trunk code. So
> should I just checkout the trunk code, make the changes and then  
> submit
> the diffs?
>
> Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West  
> River
> Road, Grand Island, New York, 14072, USA
> Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716) 625-1305 *
> z.trabaris@insysware.com * www.insysware.com
>
> CONFIDENTIALITY: This email (including any attachments) may contain
> confidential, proprietary and privileged information, and unauthorized
> disclosure or use is prohibited. If you received this email in error,
> please notify the sender and delete this email from your system. Thank
> you.
>
>
> -----Original Message-----
> From: George Stan [mailto:george.stanx@yahoo.com]
> Sent: Sunday, January 17, 2010 5:06 AM
> To: dev@cayenne.apache.org
> Subject: Re: Index modeling
>
>>> Are there any plans to add DB index definitions and
>> generation in the
>>> DBEntities in the near future? We are currently
>> managing these outside
>>> of the Cayenne xml and using SQLTemplates to generate
>> them when I sync
>>> the models to the DB. It would be nice if we don't
>> have to maintain that
>>> code if Cayenne would handle it for us.
>>
>> You could certainly put forward a patch for this work and
>> it would be welcomed. Should be simple enough to implement
>> the changes to the model schema and the modeler.
>>
>> There is already a Jira task open for this but I don't
>> believe anyone has started work.
> It is this JIRA issue:
> https://issues.apache.org/jira/browse/CAY-204
>
> And it's one of the most (wanted and) voted feature request:
> https://issues.apache.org/jira/browse/CAY?report=com.atlassian.jira.plug
> in.system.project:popularissues-panel
>
> George.
>
>
>
>
>


Re: Index modeling

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 18/01/10 4:24 AM, Zissis Trabaris wrote:
> I think I could get it cleanly added to Cayenne 3.1. I would probably
> have to upgrade the DBMerger, LoaderDeligate, DBLoader, DBEntity, create
> a MergerToken, and possibly upgrade DBAdapter. Someone else would have
> to upgrade the modeler since I am not up to speed with that code. I then
> would be able to contribute the changes back into the trunk code. So
> should I just checkout the trunk code, make the changes and then submit
> the diffs?

Yes, that's the best way. And then attach those diffs to the Jira task which will ensure licensing isn't a problem (you'll be asked to confirm the license arrangements when you attach the file).

One other thing that needs to be done is to update the XML schema, but if you aren't familiar with that, I'll take care of it.

I assume you'll be thinking about things like indexes across multiple columns, index width, index type (unique, fulltext, etc) and the differences between index types on different databases.

This will be a really useful addition, thanks for working on this.

Ari

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

RE: Index modeling

Posted by Zissis Trabaris <z....@insysware.com>.
I think I could get it cleanly added to Cayenne 3.1. I would probably
have to upgrade the DBMerger, LoaderDeligate, DBLoader, DBEntity, create
a MergerToken, and possibly upgrade DBAdapter. Someone else would have
to upgrade the modeler since I am not up to speed with that code. I then
would be able to contribute the changes back into the trunk code. So
should I just checkout the trunk code, make the changes and then submit
the diffs?

Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West River
Road, Grand Island, New York, 14072, USA 
Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716) 625-1305 *
z.trabaris@insysware.com * www.insysware.com 

CONFIDENTIALITY: This email (including any attachments) may contain
confidential, proprietary and privileged information, and unauthorized
disclosure or use is prohibited. If you received this email in error,
please notify the sender and delete this email from your system. Thank
you. 


-----Original Message-----
From: George Stan [mailto:george.stanx@yahoo.com] 
Sent: Sunday, January 17, 2010 5:06 AM
To: dev@cayenne.apache.org
Subject: Re: Index modeling

> > Are there any plans to add DB index definitions and
> generation in the
> > DBEntities in the near future? We are currently
> managing these outside
> > of the Cayenne xml and using SQLTemplates to generate
> them when I sync
> > the models to the DB. It would be nice if we don't
> have to maintain that
> > code if Cayenne would handle it for us.
> 
> You could certainly put forward a patch for this work and
> it would be welcomed. Should be simple enough to implement
> the changes to the model schema and the modeler.
> 
> There is already a Jira task open for this but I don't
> believe anyone has started work.
It is this JIRA issue:
https://issues.apache.org/jira/browse/CAY-204

And it's one of the most (wanted and) voted feature request:
https://issues.apache.org/jira/browse/CAY?report=com.atlassian.jira.plug
in.system.project:popularissues-panel

George.


      


Re: Index modeling

Posted by George Stan <ge...@yahoo.com>.
> > Are there any plans to add DB index definitions and
> generation in the
> > DBEntities in the near future? We are currently
> managing these outside
> > of the Cayenne xml and using SQLTemplates to generate
> them when I sync
> > the models to the DB. It would be nice if we don't
> have to maintain that
> > code if Cayenne would handle it for us.
> 
> You could certainly put forward a patch for this work and
> it would be welcomed. Should be simple enough to implement
> the changes to the model schema and the modeler.
> 
> There is already a Jira task open for this but I don't
> believe anyone has started work.
It is this JIRA issue:
https://issues.apache.org/jira/browse/CAY-204

And it's one of the most (wanted and) voted feature request:
https://issues.apache.org/jira/browse/CAY?report=com.atlassian.jira.plugin.system.project:popularissues-panel

George.


      


Re: Index modeling

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 17/01/10 5:47 AM, Zissis Trabaris wrote:
> Are there any plans to add DB index definitions and generation in the
> DBEntities in the near future? We are currently managing these outside
> of the Cayenne xml and using SQLTemplates to generate them when I sync
> the models to the DB. It would be nice if we don't have to maintain that
> code if Cayenne would handle it for us.

You could certainly put forward a patch for this work and it would be welcomed. Should be simple enough to implement the changes to the model schema and the modeler.

There is already a Jira task open for this but I don't believe anyone has started work.

Ari


-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A