You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by emeka okafor <em...@yahoo.com> on 2012/11/24 17:59:50 UTC
adding new columns to table
Is there a cayenne way to modifying a databse table? Like a way for cayenne to generate a migration class that can be run when when my schema changes.
Re: adding new columns to table
Posted by Aristedes Maniatis <ar...@maniatis.org>.
Also liquibase is really good, especially if you support multiple database types.
Ari
On 25/11/12 9:08am, Juan José Gil wrote:
> wouldn't be better to use something like flyway? http://flywaydb.org/
>
>
> 2012/11/24 John Huss <jo...@gmail.com>
>
>> There is an experimental library in the cayenne-sandbox you could try:
>> http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
>>
>> I'm using it in production, but your mileage may vary. The migrations are
>> not automatically generated (except for the initial database) but they are
>> easy to write.
>>
>>
>> On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
>> wrote:
>>
>>> Is there a cayenne way to modifying a databse table? Like a way for
>>> cayenne to generate a migration class that can be run when when my schema
>>> changes.
>>
>
--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
Re: adding new columns to table
Posted by Juan José Gil <ma...@gmail.com>.
I've been using cayenne+flyway in a maven3 project... its a pleasure ;)
its true that they don't integrate but, till now it does not been a problem
for me :)
2012/11/26 Michael Gentry <mg...@masslight.net>
> Using Flyway (or Liquibase), you'll have to extract the JDBC connection
> from Cayenne to pass to Flyway to perform the migration when the
> application initializes. See the bottom of:
>
> http://flywaydb.org/documentation/api.html
>
> Also, Flyway doesn't know about Cayenne, so you'd have to update your
> Cayenne model to have your new column(s) then add an SQL script (or Java
> migration) for Flyway to use to upgrade the schema separately. Not too
> difficult, just something to keep in mind to be part of your process.
>
> mrg
>
>
>
> On Sun, Nov 25, 2012 at 10:45 AM, emeka okafor <em...@yahoo.com>
> wrote:
>
> > Thank you for your suggestions; I am going to try both and see which one
> > is easier.
> >
> >
> >
> > ________________________________
> > From: Juan José Gil <ma...@gmail.com>
> > To: user@cayenne.apache.org
> > Sent: Saturday, November 24, 2012 11:08 PM
> > Subject: Re: adding new columns to table
> >
> > wouldn't be better to use something like flyway? http://flywaydb.org/
> >
> >
> > 2012/11/24 John Huss <jo...@gmail.com>
> >
> > > There is an experimental library in the cayenne-sandbox you could try:
> > > http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
> > >
> > > I'm using it in production, but your mileage may vary. The migrations
> > are
> > > not automatically generated (except for the initial database) but they
> > are
> > > easy to write.
> > >
> > >
> > > On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
> > > wrote:
> > >
> > > > Is there a cayenne way to modifying a databse table? Like a way for
> > > > cayenne to generate a migration class that can be run when when my
> > schema
> > > > changes.
> > >
> >
>
Re: adding new columns to table
Posted by Michael Gentry <mg...@masslight.net>.
Using Flyway (or Liquibase), you'll have to extract the JDBC connection
from Cayenne to pass to Flyway to perform the migration when the
application initializes. See the bottom of:
http://flywaydb.org/documentation/api.html
Also, Flyway doesn't know about Cayenne, so you'd have to update your
Cayenne model to have your new column(s) then add an SQL script (or Java
migration) for Flyway to use to upgrade the schema separately. Not too
difficult, just something to keep in mind to be part of your process.
mrg
On Sun, Nov 25, 2012 at 10:45 AM, emeka okafor <em...@yahoo.com> wrote:
> Thank you for your suggestions; I am going to try both and see which one
> is easier.
>
>
>
> ________________________________
> From: Juan José Gil <ma...@gmail.com>
> To: user@cayenne.apache.org
> Sent: Saturday, November 24, 2012 11:08 PM
> Subject: Re: adding new columns to table
>
> wouldn't be better to use something like flyway? http://flywaydb.org/
>
>
> 2012/11/24 John Huss <jo...@gmail.com>
>
> > There is an experimental library in the cayenne-sandbox you could try:
> > http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
> >
> > I'm using it in production, but your mileage may vary. The migrations
> are
> > not automatically generated (except for the initial database) but they
> are
> > easy to write.
> >
> >
> > On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
> > wrote:
> >
> > > Is there a cayenne way to modifying a databse table? Like a way for
> > > cayenne to generate a migration class that can be run when when my
> schema
> > > changes.
> >
>
RE: select distinct ...
Posted by Sampath Uppula <SU...@TechMahindra.com>.
You can see more here:
http://cayenne.apache.org/doc/sqltemplate-result-mapping.html
Thanks,
Sampath Uppula
________________________________________
From: reich.markus@gmail.com [reich.markus@gmail.com] On Behalf Of Markus Reich [markus.reich@markusreich.at]
Sent: Friday, December 07, 2012 2:35 AM
To: user@cayenne.apache.org; emeka okafor
Subject: Re: select distinct ...
Hi,
just take a look at the SelectQuery Options
http://cayenne.apache.org/docs/3.0/selectquery-customization.html
regards
Meex
2012/12/6 emeka okafor <em...@yahoo.com>
> Is there such thing as select distinct in cayenne? I would like to remove
> duplicate objects based on a specific column. What is the best way to do it
> in cayenne?
> Should I have to filter them in memory or is there another way?
> Thanks
--
*Markus Reich*
Moosbach 28/2
6392 St. Jakob i.H.
www.markusreich.at / www.meeximum.at
markus.reich@markusreich.at
============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/tim/disclaimer.html">http://tim.techmahindra.com/tim/disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================
Re: select distinct ...
Posted by Markus Reich <ma...@markusreich.at>.
Hi,
just take a look at the SelectQuery Options
http://cayenne.apache.org/docs/3.0/selectquery-customization.html
regards
Meex
2012/12/6 emeka okafor <em...@yahoo.com>
> Is there such thing as select distinct in cayenne? I would like to remove
> duplicate objects based on a specific column. What is the best way to do it
> in cayenne?
> Should I have to filter them in memory or is there another way?
> Thanks
--
*Markus Reich*
Moosbach 28/2
6392 St. Jakob i.H.
www.markusreich.at / www.meeximum.at
markus.reich@markusreich.at
select distinct ...
Posted by emeka okafor <em...@yahoo.com>.
Is there such thing as select distinct in cayenne? I would like to remove duplicate objects based on a specific column. What is the best way to do it in cayenne?
Should I have to filter them in memory or is there another way?
Thanks
Re: adding new columns to table
Posted by emeka okafor <em...@yahoo.com>.
Thank you very much indeed.
________________________________
From: Andrus Adamchik <an...@objectstyle.org>
To: user@cayenne.apache.org
Sent: Monday, November 26, 2012 8:47 PM
Subject: Re: adding new columns to table
This is a viewer URL. Try this instead:
http://svn.apache.org/repos/asf/cayenne/sandbox/cayenne-migrations/
On Nov 26, 2012, at 10:43 PM, emeka okafor <em...@yahoo.com> wrote:
> For some reason I can't seem to be able to check out cayenne-migrations:
> svn co http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations does not work
>
>
> ________________________________
> From: emeka okafor <em...@yahoo.com>
> To: "user@cayenne.apache.org" <us...@cayenne.apache.org>
> Sent: Sunday, November 25, 2012 4:45 PM
> Subject: Re: adding new columns to table
>
> Thank you for your suggestions; I am going to try both and see which one is easier.
>
>
>
> ________________________________
> From: Juan José Gil <ma...@gmail.com>
> To: user@cayenne.apache.org
> Sent: Saturday, November 24, 2012 11:08 PM
> Subject: Re: adding new columns to table
>
> wouldn't be better to use something like flyway? http://flywaydb.org/
>
>
> 2012/11/24 John Huss <jo...@gmail.com>
>
>> There is an experimental library in the cayenne-sandbox you could try:
>> http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
>>
>> I'm using it in production, but your mileage may vary. The migrations are
>> not automatically generated (except for the initial database) but they are
>> easy to write.
>>
>>
>> On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
>> wrote:
>>
>>> Is there a cayenne way to modifying a databse table? Like a way for
>>> cayenne to generate a migration class that can be run when when my schema
>>> changes.
Re: adding new columns to table
Posted by Andrus Adamchik <an...@objectstyle.org>.
This is a viewer URL. Try this instead:
http://svn.apache.org/repos/asf/cayenne/sandbox/cayenne-migrations/
On Nov 26, 2012, at 10:43 PM, emeka okafor <em...@yahoo.com> wrote:
> For some reason I can't seem to be able to check out cayenne-migrations:
> svn co http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations does not work
>
>
> ________________________________
> From: emeka okafor <em...@yahoo.com>
> To: "user@cayenne.apache.org" <us...@cayenne.apache.org>
> Sent: Sunday, November 25, 2012 4:45 PM
> Subject: Re: adding new columns to table
>
> Thank you for your suggestions; I am going to try both and see which one is easier.
>
>
>
> ________________________________
> From: Juan José Gil <ma...@gmail.com>
> To: user@cayenne.apache.org
> Sent: Saturday, November 24, 2012 11:08 PM
> Subject: Re: adding new columns to table
>
> wouldn't be better to use something like flyway? http://flywaydb.org/
>
>
> 2012/11/24 John Huss <jo...@gmail.com>
>
>> There is an experimental library in the cayenne-sandbox you could try:
>> http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
>>
>> I'm using it in production, but your mileage may vary. The migrations are
>> not automatically generated (except for the initial database) but they are
>> easy to write.
>>
>>
>> On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
>> wrote:
>>
>>> Is there a cayenne way to modifying a databse table? Like a way for
>>> cayenne to generate a migration class that can be run when when my schema
>>> changes.
Re: adding new columns to table
Posted by emeka okafor <em...@yahoo.com>.
For some reason I can't seem to be able to check out cayenne-migrations:
svn co http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations does not work
________________________________
From: emeka okafor <em...@yahoo.com>
To: "user@cayenne.apache.org" <us...@cayenne.apache.org>
Sent: Sunday, November 25, 2012 4:45 PM
Subject: Re: adding new columns to table
Thank you for your suggestions; I am going to try both and see which one is easier.
________________________________
From: Juan José Gil <ma...@gmail.com>
To: user@cayenne.apache.org
Sent: Saturday, November 24, 2012 11:08 PM
Subject: Re: adding new columns to table
wouldn't be better to use something like flyway? http://flywaydb.org/
2012/11/24 John Huss <jo...@gmail.com>
> There is an experimental library in the cayenne-sandbox you could try:
> http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
>
> I'm using it in production, but your mileage may vary. The migrations are
> not automatically generated (except for the initial database) but they are
> easy to write.
>
>
> On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
> wrote:
>
> > Is there a cayenne way to modifying a databse table? Like a way for
> > cayenne to generate a migration class that can be run when when my schema
> > changes.
>
Re: adding new columns to table
Posted by emeka okafor <em...@yahoo.com>.
Thank you for your suggestions; I am going to try both and see which one is easier.
________________________________
From: Juan José Gil <ma...@gmail.com>
To: user@cayenne.apache.org
Sent: Saturday, November 24, 2012 11:08 PM
Subject: Re: adding new columns to table
wouldn't be better to use something like flyway? http://flywaydb.org/
2012/11/24 John Huss <jo...@gmail.com>
> There is an experimental library in the cayenne-sandbox you could try:
> http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
>
> I'm using it in production, but your mileage may vary. The migrations are
> not automatically generated (except for the initial database) but they are
> easy to write.
>
>
> On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
> wrote:
>
> > Is there a cayenne way to modifying a databse table? Like a way for
> > cayenne to generate a migration class that can be run when when my schema
> > changes.
>
Re: adding new columns to table
Posted by Juan José Gil <ma...@gmail.com>.
wouldn't be better to use something like flyway? http://flywaydb.org/
2012/11/24 John Huss <jo...@gmail.com>
> There is an experimental library in the cayenne-sandbox you could try:
> http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
>
> I'm using it in production, but your mileage may vary. The migrations are
> not automatically generated (except for the initial database) but they are
> easy to write.
>
>
> On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com>
> wrote:
>
> > Is there a cayenne way to modifying a databse table? Like a way for
> > cayenne to generate a migration class that can be run when when my schema
> > changes.
>
Re: adding new columns to table
Posted by John Huss <jo...@gmail.com>.
There is an experimental library in the cayenne-sandbox you could try:
http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
I'm using it in production, but your mileage may vary. The migrations are
not automatically generated (except for the initial database) but they are
easy to write.
On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor <em...@yahoo.com> wrote:
> Is there a cayenne way to modifying a databse table? Like a way for
> cayenne to generate a migration class that can be run when when my schema
> changes.