[transfer-dev] ManyToMany TransferObject child is not persisted

2009-01-27 Thread systemseven

In TransferObject 'video' manytomany 'dyp' has not been persisted in
the database.

I have a video table that is joined to both a category table and a tag
table

In my transfer.xml category and tag are both manytomany relationships
with the video object

When saving the object, the tags get saved but the categories do not
get added to the join table, it throws an error:
In TransferObject 'video' manytomany 'dyp' has not been persisted in
the database.

Is this a common problem? Am I just overlooking something obvious?

TRANSFER.XML===
transfer
objectDefinitions
object name=video table=videoManager
id name=id type=string /
property name=title type=string /
property name=summary type=string /
property name=fullstory type=string /
property name=videoFile type=string /
property name=thumbnailFile type=string 
nullable=true/
property name=previewFile type=string 
nullable=true/
property name=podcastFile type=string 
nullable=true/
property name=inPodcast type=numeric /
property name=inRSS type=numeric /
property name=onHomepage type=numeric /
property name=sendToTwitter type=numeric /
property name=postingDate type=date /
property name=twitterDate type=date 
nullable=true/
property name=homeDate type=date nullable=true/
property name=createdDate type=date /
property name=modifiedDate type=date /

manytomany name=categories table=vm_categories
   link to=video column=videoId/
   link to=dyp column=dypId/
   collection type=array
order property=title order=asc/
   /collection
/manytomany

manytomany name=tags table=vm_tags
   link to=video column=videoId/
   link to=tag column=tagId/
   collection type=array
order property=tagText order=asc/
   /collection
/manytomany

/object

object name=dyp table=dyp_categories
id name=id type=string /
property name=title type=string /
/object

object name=tag table=tags
id name=id type=string /
property name=tagText type=string /
/object

/objectDefinitions
/transfer
===

=SAVE FUNCTION=
v.clearCategories();

for(i=1;i lte 
listLen(arguments.data.categories);i=i+1)
{

item=ListGetAt(arguments.data.categories,i);
cat = variables.transferObj.get(dyp, 
i);
v.addCategories(cat);
}





--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: ManyToMany TransferObject child is not persisted

2009-01-27 Thread Mark Mandel

You are trying to save a video, which has a 'dyp' that has not been
persisted in the database.

This means Transfer doesn't know what PK value to use for the object.

Mark

On Tue, Jan 27, 2009 at 11:40 PM, systemseven
systemsevendesi...@gmail.com wrote:

 In TransferObject 'video' manytomany 'dyp' has not been persisted in
 the database.

 I have a video table that is joined to both a category table and a tag
 table

 In my transfer.xml category and tag are both manytomany relationships
 with the video object

 When saving the object, the tags get saved but the categories do not
 get added to the join table, it throws an error:
 In TransferObject 'video' manytomany 'dyp' has not been persisted in
 the database.

 Is this a common problem? Am I just overlooking something obvious?

 TRANSFER.XML===
 transfer
objectDefinitions
object name=video table=videoManager
id name=id type=string /
property name=title type=string /
property name=summary type=string /
property name=fullstory type=string /
property name=videoFile type=string /
property name=thumbnailFile type=string 
 nullable=true/
property name=previewFile type=string 
 nullable=true/
property name=podcastFile type=string 
 nullable=true/
property name=inPodcast type=numeric /
property name=inRSS type=numeric /
property name=onHomepage type=numeric /
property name=sendToTwitter type=numeric /
property name=postingDate type=date /
property name=twitterDate type=date 
 nullable=true/
property name=homeDate type=date nullable=true/
property name=createdDate type=date /
property name=modifiedDate type=date /

manytomany name=categories table=vm_categories
   link to=video column=videoId/
   link to=dyp column=dypId/
   collection type=array
order property=title order=asc/
   /collection
/manytomany

manytomany name=tags table=vm_tags
   link to=video column=videoId/
   link to=tag column=tagId/
   collection type=array
order property=tagText order=asc/
   /collection
/manytomany

/object

object name=dyp table=dyp_categories
id name=id type=string /
property name=title type=string /
/object

object name=tag table=tags
id name=id type=string /
property name=tagText type=string /
/object

/objectDefinitions
 /transfer
 ===

 =SAVE FUNCTION=
v.clearCategories();

for(i=1;i lte 
 listLen(arguments.data.categories);i=i+1)
{

 item=ListGetAt(arguments.data.categories,i);
cat = variables.transferObj.get(dyp, 
 i);
v.addCategories(cat);
}



 

 




-- 
E: mark.man...@gmail.com
W: www.compoundtheory.com

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris H

there are no caching options set in the transfer config, so they're
the defaults.
the cache updates correctly for 1-2 of the objects, but not for most
of the others.
if it helps, i'm updating via Ajax with a Remote Proxy that was
generated with ColdSpring. But this works fine for one of the objects,
so that can't be it.
What could be a cause for this if the database is updated fine but
after a reload of the page the old values are still displayed?
thanks!

On Jan 27, 1:51 pm, Chris Peterson overrid...@gmail.com wrote:
 sounds like you have your cache in perhaps 2 different spots, or the save is
 happening under a different application name?

 Care to post the cache portion of your transfer config?

 Chris Peterson

 On Tue, Jan 27, 2009 at 7:30 AM, Chris H 3darkli...@gmail.com wrote:

  Hey, this is my first full application i'm doing with Transfer and i'm
  having a problem with the cache.
  Most cached objects don't get updated on save(), but the changes are
  visible in the database. Only when I do an ?init=true (which reinits
  Model-Glue  ColdSpring) are the TransferObjects updated.
  any ideas? thanks in advance!

 --
 Hey! I dont tell you how to tell me what to do, so dont tell me how to do
 what you tell me to do! ~ Bender (Futurama)
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Matt Williams

It sounds like somehow when you get the transfer bean that you are
saving it is not pulling the cached version. How do you get that bean
and populate it?
The Remote Proxy could be the issue if it is somehow getting setup
with a different instance of Transfer.

Matt Williams

On Jan 27, 8:04 am, Chris H 3darkli...@gmail.com wrote:
 there are no caching options set in the transfer config, so they're
 the defaults.
 the cache updates correctly for 1-2 of the objects, but not for most
 of the others.
 if it helps, i'm updating via Ajax with a Remote Proxy that was
 generated with ColdSpring. But this works fine for one of the objects,
 so that can't be it.
 What could be a cause for this if the database is updated fine but
 after a reload of the page the old values are still displayed?
 thanks!

 On Jan 27, 1:51 pm, Chris Peterson overrid...@gmail.com wrote:

  sounds like you have your cache in perhaps 2 different spots, or the save is
  happening under a different application name?

  Care to post the cache portion of your transfer config?

  Chris Peterson

  On Tue, Jan 27, 2009 at 7:30 AM, Chris H 3darkli...@gmail.com wrote:

   Hey, this is my first full application i'm doing with Transfer and i'm
   having a problem with the cache.
   Most cached objects don't get updated on save(), but the changes are
   visible in the database. Only when I do an ?init=true (which reinits
   Model-Glue  ColdSpring) are the TransferObjects updated.
   any ideas? thanks in advance!

  --
  Hey! I dont tell you how to tell me what to do, so dont tell me how to do
  what you tell me to do! ~ Bender (Futurama)
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris H

well, the Remote Proxy is using the same beanFactory that is defined
as Application.beanFactory. i though about this too, the thing is, the
one Object that works is using the same Remoty Proxy for its updates
and there are no problems there. it's calling the same function to
update its values as the other ones that don't work.

On Jan 27, 2:12 pm, Matt Williams mgw...@gmail.com wrote:
 It sounds like somehow when you get the transfer bean that you are
 saving it is not pulling the cached version. How do you get that bean
 and populate it?
 The Remote Proxy could be the issue if it is somehow getting setup
 with a different instance of Transfer.

 Matt Williams

 On Jan 27, 8:04 am, Chris H 3darkli...@gmail.com wrote:

  there are no caching options set in the transfer config, so they're
  the defaults.
  the cache updates correctly for 1-2 of the objects, but not for most
  of the others.
  if it helps, i'm updating via Ajax with a Remote Proxy that was
  generated with ColdSpring. But this works fine for one of the objects,
  so that can't be it.
  What could be a cause for this if the database is updated fine but
  after a reload of the page the old values are still displayed?
  thanks!

  On Jan 27, 1:51 pm, Chris Peterson overrid...@gmail.com wrote:

   sounds like you have your cache in perhaps 2 different spots, or the save 
   is
   happening under a different application name?

   Care to post the cache portion of your transfer config?

   Chris Peterson

   On Tue, Jan 27, 2009 at 7:30 AM, Chris H 3darkli...@gmail.com wrote:

Hey, this is my first full application i'm doing with Transfer and i'm
having a problem with the cache.
Most cached objects don't get updated on save(), but the changes are
visible in the database. Only when I do an ?init=true (which reinits
Model-Glue  ColdSpring) are the TransferObjects updated.
any ideas? thanks in advance!

   --
   Hey! I dont tell you how to tell me what to do, so dont tell me how to do
   what you tell me to do! ~ Bender (Futurama)
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread John Whish
This is a wild stab in the dark, but is it the browser caching the data? I
once had a similar problem with IE, where I had to append a random value to
the URL of the script my AJAX was calling. I think the latest version of
ColdFire has a feature for debugging ColdSpring Remote Proxy although I've
not tried it.

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread jonathanburnham
scope your vars by adding the scope in dot notation.  So when you update
your object, instead of objvarname.setProperty()use
scope.objvarname.setProperty()

On Tue, Jan 27, 2009 at 8:56 AM, Chris H 3darkli...@gmail.com wrote:


 jonathanburnham: i'm guessing that is it. so how would i go about
 always using the same scope?

 On Jan 27, 2:51 pm, jonathanburnham jonathanburn...@gmail.com wrote:
  Is it possible the object exists in two different scopes?  Maybe the
 object
  that is updating the database is in request, and what is generating your
  output is in a persistant scope?
 
   On Tue, Jan 27, 2009 at 8:43 AM, Chris H 3darkli...@gmail.com wrote:
 
   well, the Remote Proxy is using the same beanFactory that is defined
   as Application.beanFactory. i though about this too, the thing is, the
   one Object that works is using the same Remoty Proxy for its updates
   and there are no problems there. it's calling the same function to
   update its values as the other ones that don't work.
 
   On Jan 27, 2:12 pm, Matt Williams mgw...@gmail.com wrote:
It sounds like somehow when you get the transfer bean that you are
saving it is not pulling the cached version. How do you get that bean
and populate it?
The Remote Proxy could be the issue if it is somehow getting setup
with a different instance of Transfer.
 
Matt Williams
 
On Jan 27, 8:04 am, Chris H 3darkli...@gmail.com wrote:
 
 there are no caching options set in the transfer config, so they're
 the defaults.
 the cache updates correctly for 1-2 of the objects, but not for
 most
 of the others.
 if it helps, i'm updating via Ajax with a Remote Proxy that was
 generated with ColdSpring. But this works fine for one of the
 objects,
 so that can't be it.
 What could be a cause for this if the database is updated fine but
 after a reload of the page the old values are still displayed?
 thanks!
 
 On Jan 27, 1:51 pm, Chris Peterson overrid...@gmail.com wrote:
 
  sounds like you have your cache in perhaps 2 different spots, or
 the
   save is
  happening under a different application name?
 
  Care to post the cache portion of your transfer config?
 
  Chris Peterson
 
  On Tue, Jan 27, 2009 at 7:30 AM, Chris H 3darkli...@gmail.com
   wrote:
 
   Hey, this is my first full application i'm doing with Transfer
 and
   i'm
   having a problem with the cache.
   Most cached objects don't get updated on save(), but the
 changes
   are
   visible in the database. Only when I do an ?init=true (which
   reinits
   Model-Glue  ColdSpring) are the TransferObjects updated.
   any ideas? thanks in advance!
 
  --
  Hey! I dont tell you how to tell me what to do, so dont tell me
 how
   to do
  what you tell me to do! ~ Bender (Futurama)
 


--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: ManyToMany TransferObject child is not persisted

2009-01-27 Thread systemseven

Mark,

Makes sense, but I'm not sure how to tell transfer what it needs to
know. Here is the full code from my save function. Maybe that will
help you point me in the right direction.


if(len(trim(arguments.data.id)))
{
v = 
variables.transferObj.get('video',arguments.data.id);
v.setModifiedDate(now());
}
else
{
v = variables.transferObj.new('video');
v.setCreatedDate(now());
uuid = CreateUUID();
}

if(len(trim(uuid)))
{
v.setId(uuid);
}

v.setTitle(arguments.data.title);
v.setSummary(arguments.data.summary);
v.setFullStory(arguments.data.fullStory);
v.setVideoFile(arguments.data.videoFile);
v.setInPodcast(arguments.data.inPodcast);
v.setInRSS(arguments.data.inRSS);
v.setOnHomepage(arguments.data.onHomepage);

v.setSendToTwitter(arguments.data.sendToTwitter);

v.setPostingDate(postingDate);

if(arguments.data.onHomepage)
{
v.setHomeDate(homeDate);
}

if(arguments.data.sendToTwitter){
v.setTwitterDate(twitterDate);
}

if(len(trim(arguments.data.thumbnail))){

v.setThumbnailFile(arguments.data.thumbnail);
}

if(len(trim(arguments.data.preview))){

v.setPreviewFile(arguments.data.preview);
}

if(arguments.data.inPodcast){

v.setPodcastFile(arguments.data.podcastFile);
}

//assign the categories, first clear them
v.clearCategories();

for(i=1;i lte 
listLen(arguments.data.categories);i=i+1)
{

item=ListGetAt(arguments.data.categories,i);
cat = variables.transferObj.get(dyp, 
i);
v.addCategories(cat);
}
//clear tag association, add new tags, assign 
tags to this item
v.clearTags();

for(i=1; i lte ListLen(arguments.data.tags); 
i=i+1){
item = ListGetAt(arguments.data.tags,i);
//create the tag transfer object
t = variables.transferObj.new('tag');
t.setId(CreateUUID());
t.setTagText(item);
//save it
variables.transferObj.save(t);
//associate it with this video
v.addTags(t);
}

variables.transferObj.save(v);

On Jan 27, 7:46 am, Mark Mandel mark.man...@gmail.com wrote:
 You are trying to save a video, which has a 'dyp' that has not been
 persisted in the database.

 This means Transfer doesn't know what PK value to use for the object.

 Mark

 On Tue, Jan 27, 2009 at 11:40 PM, systemseven



 systemsevendesi...@gmail.com wrote:

  In TransferObject 'video' manytomany 'dyp' has not been persisted in
  the database.

  I have a video table that is joined to both a category table and a tag
  table

  In my transfer.xml category and tag are both manytomany relationships
  with the video object

  When saving the object, the tags get saved but the categories do not
  get added to the join table, it throws an error:
  In TransferObject 'video' manytomany 'dyp' has not been persisted in
  the database.

  Is this a common problem? Am I just overlooking something obvious?

  TRANSFER.XML===
  transfer
         objectDefinitions
                 object name=video table=videoManager
                 

[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris H

thanks anyway man!
i'm at a dead-end and this is a production site that should go online
soon, so any help/suggestions would be welcome. Mark, anyone? ;D

On Jan 27, 3:34 pm, jonathanburnham jonathanburn...@gmail.com wrote:
 I can't speak to that.  I haven't yet started using the Transfer cache.

 On Tue, Jan 27, 2009 at 9:26 AM, Chris H 3darkli...@gmail.com wrote:

  i tried it with Application.objvarname.setProperty()... but no go.
  should i try setting the cache options in the transfer config file to
  a different scope?

  On Jan 27, 2:59 pm, jonathanburnham jonathanburn...@gmail.com wrote:
   scope your vars by adding the scope in dot notation.  So when you update
   your object, instead of objvarname.setProperty()use
   scope.objvarname.setProperty()

    On Tue, Jan 27, 2009 at 8:56 AM, Chris H 3darkli...@gmail.com wrote:

jonathanburnham: i'm guessing that is it. so how would i go about
always using the same scope?

On Jan 27, 2:51 pm, jonathanburnham jonathanburn...@gmail.com wrote:
 Is it possible the object exists in two different scopes?  Maybe the
object
 that is updating the database is in request, and what is generating
  your
 output is in a persistant scope?

  On Tue, Jan 27, 2009 at 8:43 AM, Chris H 3darkli...@gmail.com
  wrote:

  well, the Remote Proxy is using the same beanFactory that is
  defined
  as Application.beanFactory. i though about this too, the thing is,
  the
  one Object that works is using the same Remoty Proxy for its
  updates
  and there are no problems there. it's calling the same function to
  update its values as the other ones that don't work.

  On Jan 27, 2:12 pm, Matt Williams mgw...@gmail.com wrote:
   It sounds like somehow when you get the transfer bean that you
  are
   saving it is not pulling the cached version. How do you get that
  bean
   and populate it?
   The Remote Proxy could be the issue if it is somehow getting
  setup
   with a different instance of Transfer.

   Matt Williams

   On Jan 27, 8:04 am, Chris H 3darkli...@gmail.com wrote:

there are no caching options set in the transfer config, so
  they're
the defaults.
the cache updates correctly for 1-2 of the objects, but not for
most
of the others.
if it helps, i'm updating via Ajax with a Remote Proxy that was
generated with ColdSpring. But this works fine for one of the
objects,
so that can't be it.
What could be a cause for this if the database is updated fine
  but
after a reload of the page the old values are still displayed?
thanks!

On Jan 27, 1:51 pm, Chris Peterson overrid...@gmail.com
  wrote:

 sounds like you have your cache in perhaps 2 different spots,
  or
the
  save is
 happening under a different application name?

 Care to post the cache portion of your transfer config?

 Chris Peterson

 On Tue, Jan 27, 2009 at 7:30 AM, Chris H 
  3darkli...@gmail.com
  wrote:

  Hey, this is my first full application i'm doing with
  Transfer
and
  i'm
  having a problem with the cache.
  Most cached objects don't get updated on save(), but the
changes
  are
  visible in the database. Only when I do an ?init=true
  (which
  reinits
  Model-Glue  ColdSpring) are the TransferObjects updated.
  any ideas? thanks in advance!

 --
 Hey! I dont tell you how to tell me what to do, so dont tell
  me
how
  to do
 what you tell me to do! ~ Bender (Futurama)
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread John Whish
Are you using ColdFire to debug?
http://coldfire.riaforge.org/blog/index.cfm/2009/1/25/ColdFire-13172172

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Mark Mandel

It sounds like you have more than one instance of Transfer going..
which is why your cache is going all funky, as there is more than one
cache.

I'd put some debugging in place to verify that your model's not
getting re-created.

Mark

On Wed, Jan 28, 2009 at 2:44 AM, Chris H 3darkli...@gmail.com wrote:

 thanks anyway man!
 i'm at a dead-end and this is a production site that should go online
 soon, so any help/suggestions would be welcome. Mark, anyone? ;D

 On Jan 27, 3:34 pm, jonathanburnham jonathanburn...@gmail.com wrote:
 I can't speak to that.  I haven't yet started using the Transfer cache.

 On Tue, Jan 27, 2009 at 9:26 AM, Chris H 3darkli...@gmail.com wrote:

  i tried it with Application.objvarname.setProperty()... but no go.
  should i try setting the cache options in the transfer config file to
  a different scope?

  On Jan 27, 2:59 pm, jonathanburnham jonathanburn...@gmail.com wrote:
   scope your vars by adding the scope in dot notation.  So when you update
   your object, instead of objvarname.setProperty()use
   scope.objvarname.setProperty()

On Tue, Jan 27, 2009 at 8:56 AM, Chris H 3darkli...@gmail.com wrote:

jonathanburnham: i'm guessing that is it. so how would i go about
always using the same scope?

On Jan 27, 2:51 pm, jonathanburnham jonathanburn...@gmail.com wrote:
 Is it possible the object exists in two different scopes?  Maybe the
object
 that is updating the database is in request, and what is generating
  your
 output is in a persistant scope?

  On Tue, Jan 27, 2009 at 8:43 AM, Chris H 3darkli...@gmail.com
  wrote:

  well, the Remote Proxy is using the same beanFactory that is
  defined
  as Application.beanFactory. i though about this too, the thing is,
  the
  one Object that works is using the same Remoty Proxy for its
  updates
  and there are no problems there. it's calling the same function to
  update its values as the other ones that don't work.

  On Jan 27, 2:12 pm, Matt Williams mgw...@gmail.com wrote:
   It sounds like somehow when you get the transfer bean that you
  are
   saving it is not pulling the cached version. How do you get that
  bean
   and populate it?
   The Remote Proxy could be the issue if it is somehow getting
  setup
   with a different instance of Transfer.

   Matt Williams

   On Jan 27, 8:04 am, Chris H 3darkli...@gmail.com wrote:

there are no caching options set in the transfer config, so
  they're
the defaults.
the cache updates correctly for 1-2 of the objects, but not for
most
of the others.
if it helps, i'm updating via Ajax with a Remote Proxy that was
generated with ColdSpring. But this works fine for one of the
objects,
so that can't be it.
What could be a cause for this if the database is updated fine
  but
after a reload of the page the old values are still displayed?
thanks!

On Jan 27, 1:51 pm, Chris Peterson overrid...@gmail.com
  wrote:

 sounds like you have your cache in perhaps 2 different spots,
  or
the
  save is
 happening under a different application name?

 Care to post the cache portion of your transfer config?

 Chris Peterson

 On Tue, Jan 27, 2009 at 7:30 AM, Chris H 
  3darkli...@gmail.com
  wrote:

  Hey, this is my first full application i'm doing with
  Transfer
and
  i'm
  having a problem with the cache.
  Most cached objects don't get updated on save(), but the
changes
  are
  visible in the database. Only when I do an ?init=true
  (which
  reinits
  Model-Glue  ColdSpring) are the TransferObjects updated.
  any ideas? thanks in advance!

 --
 Hey! I dont tell you how to tell me what to do, so dont tell
  me
how
  to do
 what you tell me to do! ~ Bender (Futurama)
 




-- 
E: mark.man...@gmail.com
W: www.compoundtheory.com

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris Peterson
at some point, if you are using the transfer save method to persist your
objects to the database (and they ARE persisting), you must be referring to
a 2nd instance of the transfer object.  Make sure that you only have 1 place
where you create an instance of your transfer object from the transfer
factory, and place it in application scope.  Audit your code for any place
you are passing the transfer config xml files into a method, or any place
where you copy transfer from one persistent scope to another.

Also, you should be able to use transfer.cascadeSave( yourParentItem )
rather than looping and saving the children individually.

Chris

On Tue, Jan 27, 2009 at 10:46 AM, John Whish john.wh...@googlemail.comwrote:

 Are you using ColdFire to debug?
 http://coldfire.riaforge.org/blog/index.cfm/2009/1/25/ColdFire-13172172

 



-- 
Hey! I dont tell you how to tell me what to do, so dont tell me how to do
what you tell me to do! ~ Bender (Futurama)

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris H

there's nothing to debug really (though i do with Firebug). changing
data via the Remote Proxy/Ajax works fine and the database is updated,
but when i reload the page, the old data is displayed. if i do an ?
init=true i see the correct data. so i'm lost on how to tell Transfer,
without doing an init for every request, how to update the cache =D

On Jan 27, 4:46 pm, John Whish john.wh...@googlemail.com wrote:
 Are you using ColdFire to 
 debug?http://coldfire.riaforge.org/blog/index.cfm/2009/1/25/ColdFire-13172172
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: ManyToMany TransferObject child is not persisted

2009-01-27 Thread Jon Messer
I'm guessing this is because you are assuming the category (or dyp or
whatever) already exists in the database (your doing a get) but I think
you've got a bug here... is* i *really the value you want to retrieve dyp
with? or should it be item?

 for(i=1;i lte listLen(arguments.data.categories);i=i+1)
{
   item=ListGetAt(arguments.data.categories,i);
   cat = variables.transferObj.get(***dyp, i)*;
   v.addCategories(cat);
}

What will happen here is that if there is no dyp for one of the values of i
(not item, i) you will get a new unpersisted dyp object. And then when you
try to save the video it won't be able to because that dyp hasn't been
saved.


On Tue, Jan 27, 2009 at 6:55 AM, systemseven
systemsevendesi...@gmail.comwrote:


 Mark,

 Makes sense, but I'm not sure how to tell transfer what it needs to
 know. Here is the full code from my save function. Maybe that will
 help you point me in the right direction.


if(len(trim(arguments.data.id)))
{
v =
 variables.transferObj.get('video',arguments.data.id);
v.setModifiedDate(now());
}
else
{
v =
 variables.transferObj.new('video');
v.setCreatedDate(now());
uuid = CreateUUID();
}

if(len(trim(uuid)))
{
v.setId(uuid);
}

v.setTitle(arguments.data.title);
v.setSummary(arguments.data.summary);
v.setFullStory(arguments.data.fullStory);
v.setVideoFile(arguments.data.videoFile);
v.setInPodcast(arguments.data.inPodcast);
v.setInRSS(arguments.data.inRSS);
v.setOnHomepage(arguments.data.onHomepage);

  v.setSendToTwitter(arguments.data.sendToTwitter);

v.setPostingDate(postingDate);

if(arguments.data.onHomepage)
{
v.setHomeDate(homeDate);
}

if(arguments.data.sendToTwitter){
v.setTwitterDate(twitterDate);
}

if(len(trim(arguments.data.thumbnail))){

  v.setThumbnailFile(arguments.data.thumbnail);
}

if(len(trim(arguments.data.preview))){

  v.setPreviewFile(arguments.data.preview);
}

if(arguments.data.inPodcast){

  v.setPodcastFile(arguments.data.podcastFile);
}

//assign the categories, first clear them
 v.clearCategories();

for(i=1;i lte
 listLen(arguments.data.categories);i=i+1)
{

  item=ListGetAt(arguments.data.categories,i);
cat =
 variables.transferObj.get(dyp, i);
v.addCategories(cat);
}
 //clear tag association, add new tags,
 assign tags to this item
v.clearTags();

for(i=1; i lte ListLen(arguments.data.tags);
 i=i+1){
item =
 ListGetAt(arguments.data.tags,i);
//create the tag transfer object
t =
 variables.transferObj.new('tag');
t.setId(CreateUUID());
t.setTagText(item);
//save it
variables.transferObj.save(t);
//associate it with this video
v.addTags(t);
}

variables.transferObj.save(v);

 On Jan 27, 7:46 am, Mark Mandel mark.man...@gmail.com wrote:
  You are trying to save a video, which has a 'dyp' that has not been
  persisted in the database.
 
  This means Transfer doesn't know what PK value to use for the object.
 
  Mark
 
  On Tue, Jan 27, 2009 at 11:40 PM, systemseven
 
 
 
  systemsevendesi...@gmail.com wrote:
 
   In TransferObject 'video' manytomany 'dyp' has not been persisted in
   the database.
 
   I 

[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris H

thanks for your replies!
i'm only defining Transfer once in ColdSpring.xml:

bean id=TransferFactory class=transfer.TransferFactory
  constructor-arg name=datasourcePathvalue/config/
TransferDatasource.xml.cfm/value/constructor-arg
  constructor-arg name=configPathvalue/config/Transfer.xml.cfm/
value/constructor-arg
  constructor-arg name=definitionPathvalue/model/TransferData/
value/constructor-arg
/bean
bean id=Transfer class=transfer.com.Transfer factory-
bean=transferFactory factory-method=getTransfer /

could it be a ColdSpring problem? what confuses me is that it works
for one Object via Remote Proxy/Ajax calls, but not for the others.

On Jan 27, 4:53 pm, Chris H 3darkli...@gmail.com wrote:
 there's nothing to debug really (though i do with Firebug). changing
 data via the Remote Proxy/Ajax works fine and the database is updated,
 but when i reload the page, the old data is displayed. if i do an ?
 init=true i see the correct data. so i'm lost on how to tell Transfer,
 without doing an init for every request, how to update the cache =D

 On Jan 27, 4:46 pm, John Whish john.wh...@googlemail.com wrote:

  Are you using ColdFire to 
  debug?http://coldfire.riaforge.org/blog/index.cfm/2009/1/25/ColdFire-13172172
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris Peterson
add singleton=true to your transfer config perhaps? =)

Chris

On Tue, Jan 27, 2009 at 10:56 AM, Chris H 3darkli...@gmail.com wrote:


 thanks for your replies!
 i'm only defining Transfer once in ColdSpring.xml:

 bean id=TransferFactory class=transfer.TransferFactory
  constructor-arg name=datasourcePathvalue/config/
 TransferDatasource.xml.cfm/value/constructor-arg
  constructor-arg name=configPathvalue/config/Transfer.xml.cfm/
 value/constructor-arg
  constructor-arg name=definitionPathvalue/model/TransferData/
 value/constructor-arg
 /bean
 bean id=Transfer class=transfer.com.Transfer factory-
 bean=transferFactory factory-method=getTransfer /

 could it be a ColdSpring problem? what confuses me is that it works
 for one Object via Remote Proxy/Ajax calls, but not for the others.

 On Jan 27, 4:53 pm, Chris H 3darkli...@gmail.com wrote:
  there's nothing to debug really (though i do with Firebug). changing
  data via the Remote Proxy/Ajax works fine and the database is updated,
  but when i reload the page, the old data is displayed. if i do an ?
  init=true i see the correct data. so i'm lost on how to tell Transfer,
  without doing an init for every request, how to update the cache =D
 
  On Jan 27, 4:46 pm, John Whish john.wh...@googlemail.com wrote:
 
   Are you using ColdFire to debug?
 http://coldfire.riaforge.org/blog/index.cfm/2009/1/25/ColdFire-13172172
 



-- 
Hey! I dont tell you how to tell me what to do, so dont tell me how to do
what you tell me to do! ~ Bender (Futurama)

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris H

Well, there is just one bean with all the remote methods that's
injected all the external beans it needs.
those external beans all extend an AbstractGateway with a generic
update function. which is why i'm confused, because the object that
works is calling the same thing generic update function as the others
that don't. here are the procedures that function calls:

cfset var UpdateTO = get( TransferClassName =
Arguments.TransferClassName, ID = Arguments.ID )
cfinvoke component=#UpdateTO# method=set#Arguments.Field#
  cfinvokeargument name=#Arguments.Field#
value=#Arguments.Value#
/cfinvoke
cfset getTransfer().save( UpdateTO )

thanks for your time Chris!

On Jan 27, 5:21 pm, Chris Peterson overrid...@gmail.com wrote:
 can you paste the config in coldspring.xml for a non-working remote method,
 and a working one, then paste the contents of a non-working service call
 (that fails to persist) and the one that persists properly?

 Chris



 On Tue, Jan 27, 2009 at 11:19 AM, Chris H 3darkli...@gmail.com wrote:

  damn, now i was thinking this must be it, a simple change and all
  should be good, but still no go. argh!

  On Jan 27, 5:12 pm, Chris Peterson overrid...@gmail.com wrote:
   add singleton=true to your transfer config perhaps? =)

   Chris

   On Tue, Jan 27, 2009 at 10:56 AM, Chris H 3darkli...@gmail.com wrote:

thanks for your replies!
i'm only defining Transfer once in ColdSpring.xml:

bean id=TransferFactory class=transfer.TransferFactory
 constructor-arg name=datasourcePathvalue/config/
TransferDatasource.xml.cfm/value/constructor-arg
 constructor-arg name=configPathvalue/config/Transfer.xml.cfm/
value/constructor-arg
 constructor-arg name=definitionPathvalue/model/TransferData/
value/constructor-arg
/bean
bean id=Transfer class=transfer.com.Transfer factory-
bean=transferFactory factory-method=getTransfer /

could it be a ColdSpring problem? what confuses me is that it works
for one Object via Remote Proxy/Ajax calls, but not for the others.

On Jan 27, 4:53 pm, Chris H 3darkli...@gmail.com wrote:
 there's nothing to debug really (though i do with Firebug). changing
 data via the Remote Proxy/Ajax works fine and the database is
  updated,
 but when i reload the page, the old data is displayed. if i do an ?
 init=true i see the correct data. so i'm lost on how to tell
  Transfer,
 without doing an init for every request, how to update the cache =D

 On Jan 27, 4:46 pm, John Whish john.wh...@googlemail.com wrote:

  Are you using ColdFire to debug?
   http://coldfire.riaforge.org/blog/index.cfm/2009/1/25/ColdFire-13172172

   --
   Hey! I dont tell you how to tell me what to do, so dont tell me how to do
   what you tell me to do! ~ Bender (Futurama)

 --
 Hey! I dont tell you how to tell me what to do, so dont tell me how to do
 what you tell me to do! ~ Bender (Futurama)
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Cache not updating

2009-01-27 Thread Chris Peterson
nope, but what that tells me is that indeed you have some place where you
are trying to create another 'instance' of the transfer library.  You should
be fine leaving it as application, or digging around and finding where your
other instance is at and change it back.  =)

Chris Peterson

On Tue, Jan 27, 2009 at 12:21 PM, Chris H 3darkli...@gmail.com wrote:


 w00t, i set the defaultcache scope in the transfer config to
 application and all is well now!
 any negatives to doing this instaed of the instance scope?

 On Jan 27, 5:53 pm, Chris H 3darkli...@gmail.com wrote:
  Well, there is just one bean with all the remote methods that's
  injected all the external beans it needs.
  those external beans all extend an AbstractGateway with a generic
  update function. which is why i'm confused, because the object that
  works is calling the same thing generic update function as the others
  that don't. here are the procedures that function calls:
 
  cfset var UpdateTO = get( TransferClassName =
  Arguments.TransferClassName, ID = Arguments.ID )
  cfinvoke component=#UpdateTO# method=set#Arguments.Field#
cfinvokeargument name=#Arguments.Field#
  value=#Arguments.Value#
  /cfinvoke
  cfset getTransfer().save( UpdateTO )
 
  thanks for your time Chris!
 
  On Jan 27, 5:21 pm, Chris Peterson overrid...@gmail.com wrote:
 
   can you paste the config in coldspring.xml for a non-working remote
 method,
   and a working one, then paste the contents of a non-working service
 call
   (that fails to persist) and the one that persists properly?
 
   Chris
 
   On Tue, Jan 27, 2009 at 11:19 AM, Chris H 3darkli...@gmail.com
 wrote:
 
damn, now i was thinking this must be it, a simple change and all
should be good, but still no go. argh!
 
On Jan 27, 5:12 pm, Chris Peterson overrid...@gmail.com wrote:
 add singleton=true to your transfer config perhaps? =)
 
 Chris
 
 On Tue, Jan 27, 2009 at 10:56 AM, Chris H 3darkli...@gmail.com
 wrote:
 
  thanks for your replies!
  i'm only defining Transfer once in ColdSpring.xml:
 
  bean id=TransferFactory class=transfer.TransferFactory
   constructor-arg name=datasourcePathvalue/config/
  TransferDatasource.xml.cfm/value/constructor-arg
   constructor-arg
 name=configPathvalue/config/Transfer.xml.cfm/
  value/constructor-arg
   constructor-arg
 name=definitionPathvalue/model/TransferData/
  value/constructor-arg
  /bean
  bean id=Transfer class=transfer.com.Transfer factory-
  bean=transferFactory factory-method=getTransfer /
 
  could it be a ColdSpring problem? what confuses me is that it
 works
  for one Object via Remote Proxy/Ajax calls, but not for the
 others.
 
  On Jan 27, 4:53 pm, Chris H 3darkli...@gmail.com wrote:
   there's nothing to debug really (though i do with Firebug).
 changing
   data via the Remote Proxy/Ajax works fine and the database is
updated,
   but when i reload the page, the old data is displayed. if i do
 an ?
   init=true i see the correct data. so i'm lost on how to tell
Transfer,
   without doing an init for every request, how to update the
 cache =D
 
   On Jan 27, 4:46 pm, John Whish john.wh...@googlemail.com
 wrote:
 
Are you using ColdFire to debug?
 
 http://coldfire.riaforge.org/blog/index.cfm/2009/1/25/ColdFire-13172172
 
 --
 Hey! I dont tell you how to tell me what to do, so dont tell me how
 to do
 what you tell me to do! ~ Bender (Futurama)
 
   --
   Hey! I dont tell you how to tell me what to do, so dont tell me how to
 do
   what you tell me to do! ~ Bender (Futurama)
 



-- 
Hey! I dont tell you how to tell me what to do, so dont tell me how to do
what you tell me to do! ~ Bender (Futurama)

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] HELP!!! Multiple Parents in ManyToMany

2009-01-27 Thread Jorge Loyo

I have a situation... Any assistance will be greatly appreciated.

These are my tables:

1) tblAward(awardId,award)
2) tblActor(actorId,name)
3) tblDirector(directorId,name)
4) tblEntityAward(fk_award,fk_parent,year_awarded)

In #4, the fk_parent is the primary key in either tblActor or
tblDirector.

How would you declare the relationships in the transfer.xml?

Help!!
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: HELP!!! Multiple Parents in ManyToMany

2009-01-27 Thread Jorge Loyo

Would this make sense??


package name=award
   object name=award table=tblAward
  id name=awardId type=numeric /
  property name=award type=string column=award /
   /object

   object name=PerformerAward table=tblEntityAward
  compositeid
 manytoone name=Award /
 property name=fk_parent type=numeric column=fk_parent /

 property name=year_awarded type=numeric
column=year_awarded /
  /compositeid
  manytoone name=Award
 link column=fk_award to=award.award/
  /manytoone
   /object

   object name=DirectorAward table=tblEntityAward
  compositeid
 manytoone name=Award /
 property name=fk_parent type=numeric column=fk_parent /

 property name=year_awarded type=numeric
column=year_awarded /
  /compositeid
  manytoone name=Award
 link column=fk_award to=award.award/
 /manytoone
   /object
/package

package name=performer
   object name=performer table=tblPerformer
  id name=performerId type=numeric /
  property name=first_name type=string column=first_name /

  property name=last_name type=string column=last_name /
  onetomany name=Awards
 link to=award.PerformerAward column=fk_parent /
 collection type=array /
  /onetomany
   /object
/package

package name=director
   object name=director table=tblDirector
  id name=directorId type=numeric /
  property name=first_name type=string column=first_name /

  property name=last_name type=string column=last_name /
  onetomany name=Awards
 link to=award.DirectorAward column=fk_parent /
 collection type=array /
  /onetomany
   /object
/package

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: HELP!!! Multiple Parents in ManyToMany

2009-01-27 Thread Sean Coyne

Not really.

You want something like this (untested since I dont have your DB).

If someone else has a better idea, please chime in.

object name=award table=tblAward
id name=awardid type=numeric /
property name=award type=string /
/object

object name=director table=tblDirector
id name=directorid type=numeric /
property name=name type=string /
manytomany name=Awards table=tblEntityAward
link to=director column=fk_parent/
link to=award column=fk_award/
collection type=array
order property=year_awarded order=asc/
/collection
/manytomany
/object

object name=actor table=tblActor
id name=actorid type=numeric /
property name=name type=string /
manytomany name=Awards table=tblEntityAward
link to=actor column=fk_parent/
link to=award column=fk_award/
collection type=array
order property=year_awarded order=asc/
/collection
/manytomany
/object


On Jan 27, 2:30 pm, Jorge Loyo jorgel...@gmail.com wrote:
 Would this make sense??

--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Can transfer return a query with joined columns

2009-01-27 Thread Doug Boude
Just to add some concrete examples, here is a function I have in a model
object that uses TQL to retrieve a query of users (optionally only active
users), joined to the security table so that I know what groups a user is
part of:

cffunction name=getAllUsers access=public output=false
returntype=query
cfargument name=activeOnly type=boolean required=true
default= true /
cfset var retval =  /
cfset var thisTQL = variables._stringBuffer.setup() /
cfset var tmpQuery =  /

cfset thisTQL.append(select U.id as
userid,U.username,U.password,U.email,U.firstname,U.lastname,U.isActive as
Uactive,U.timezone,U.userLocale,SG.id as groupID,SG.groupname,SG.description
as sgDescrip,SG.isActive as sgActive from user.user as U outer join
security.securityGroup as SG) /

cfif arguments.activeOnly
cfset thistql.append( where SG.isActive = :mybool AND
U.isActive = :mybool) /
/cfif

cfset thisTQL.append(  order by
U.lastname,U.firstname,U.id,SG.groupname) /

cfset tmpQuery =
variables._transfer.createQuery(thistql.getString()) /

cfif arguments.activeOnly
cfset tmpQuery.setParam(mybool,true,boolean) /
/cfif

cfset retval = variables._transfer.listByQuery(tmpQuery) /

cfreturn retval /
/cffunction

On Tue, Jan 27, 2009 at 3:14 PM, Sean Coyne coyne.s...@gmail.com wrote:


 yeah you can use TQL to return a query.  If you just want the child
 columns, you can do

 parentObj.getChildArray() and you will have an array of child objects
 that you can loop over/do whatever to.

 Obviously replace parentObj with your obj and getChildArray() with
 getWidgetArray() or whatever your child is named.

 Sean


 On Jan 27, 4:06 pm, Jorge Loyo jorgel...@gmail.com wrote:
  If I define a manytoone relationship in the transfer.xml transfer will
  return a bean with the parent bean added to it. But is it possible
  that as you return a query with the columns from the associated table
  without writing your own gateway??
 
  I don't know if this is possible, but a co-worker just asked me about
  it.
 


--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: HELP!!! Multiple Parents in ManyToMany

2009-01-27 Thread Jorge Loyo

Thank you Sean,

I noticed that you didn't declare the association table, even when
there is a composite key. And you use the year_awarded to order by
array by.

How do you display the year_awarded? Is it included in the collection?


--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Can transfer return a query with joined columns

2009-01-27 Thread Brian Kotek
The primary reason is because Transfer is not a query abstraction tool but
an object-relational mapping tool. It is primarily meant to deal with
objects. The fact that under the hood the state of the objects is stored in
database tables is meant to be hidden.

On Tue, Jan 27, 2009 at 4:34 PM, Jorge Loyo jorgel...@gmail.com wrote:


 Thank you Brian and Doug,

 I guess his concern was that I was declaring relationships in the
 transfer.xml and I could retrieve records with associated beans, but
 not as a query with the associated columns.

 I guess trying to understand why not use the same relationship used in
 transfer.xml to add the columns from the associated table to the query
 returned instead of having to add a custom gateway method.
 


--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---



[transfer-dev] Re: Can transfer return a query with joined columns

2009-01-27 Thread Jorge Loyo

Again Thank you Brian...

Can't get clearer than that :)
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
transfer-dev group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~--~~~~--~~--~--~---