Re: Getting a New CDBI object without creating one in db?

[prev] [thread] [next] [Date index for 2004/10/19]

From: Andreas Fromm
Subject: Re: Getting a New CDBI object without creating one in db?
Date: 08:16 on 19 Oct 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Tony Bowden wrote:
| On Tue, Oct 19, 2004 at 09:13:14AM +0200, Andreas Fromm wrote:
|
|>I'm in a similar situation. If you are creating forms automatically
|>from CDBI-objects, I mean, have an object, look for all its fields and
|>then generate a form with an input-field for each field in the
|>CDBI-object, it would be nice to have such ghost-objects, because you my
|>be in the nned of generating a form, but have not to generate a
|>db-record because the user doesn't want to insert any data.
|
|
| I don't understand.
|
| Surely you just don't create the record until the user *does* want to
| insert the data?
|
| Why do you need an object to get any of the information needed for the
| form? All of the relevant information should be available as class
| methods.
|
|
| Tony
|
| PS: Class::DBI::AsForm

I know abaut CDBI::AsForm, but it's not really what I need.

The problem I have is when I want to access field names linked by has_a
fields, e.g.

MyClass::Person  has fileds: [name, surename, address]
but MyClass::Person->has_a( address => MyCLass::Addresses )

in that case I can't get the fields of MyClass::Addresses if now object
of Person has been instantiated.

I know that this case my be a bit too simple to really show the problem
because it's not hard to build a workaround, but in other situations
it's not so simple. My be I was just thinking abaut a wrong design when
a found this kind of problems, but it's some time ago now, and I'm not
sure anymore what I was exactly doing then. But it was something like
what I mentioned above.



- --
Grüße,

Andreas Fromm

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBdM1JUmBtSMq5cGURAl9rAJwKmp491ECN2gXF0648QT5eOAdTiwCeOSD9
ojR49Q8Hjsdi/c0FbCvBVyY=
=6yT5
-----END PGP SIGNATURE-----

(message missing)

domain cross talk...?
Michael Jensen 06:47 on 06 Oct 2004

Re: domain cross talk...?
William McKee 14:41 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 14:47 on 06 Oct 2004

Re: domain cross talk...?
William McKee 14:51 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 15:06 on 06 Oct 2004

Re: domain cross talk...?
William McKee 15:32 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 15:36 on 06 Oct 2004

Re: domain cross talk...?
Michael Jensen 16:03 on 06 Oct 2004

Re: domain cross talk...?
Michael Jensen 16:16 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 16:27 on 06 Oct 2004

Re: domain cross talk...?
Carl Johnstone 23:17 on 06 Oct 2004

Re: domain cross talk...?
William McKee 15:53 on 06 Oct 2004

Re: domain cross talk...?
merlyn (Randal L. Schwartz) 16:17 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 16:31 on 06 Oct 2004

[CDBI] Class::DBI::Loader question
Peter Speltz 00:31 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 02:57 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Perrin Harkins 04:12 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 18:43 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Clayton L. Scott 17:08 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Peter Speltz 17:32 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Perrin Harkins 18:58 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 14:26 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Perrin Harkins 15:17 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Tony Bowden 15:39 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 14:26 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Tim Bunce 16:22 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
merlyn (Randal L. Schwartz) 17:24 on 14 Oct 2004

Re: Getting a New CDBI object without creating one in db?
Andreas Fromm 08:16 on 19 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52