Custom Identifier - how does it work?

View: New views
4 Messages — Rating Filter:   Alert me  

Custom Identifier - how does it work?

by manfred.schreck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am using Metabase for a while, and I am happy with it.
Now I am in a situation, that I have to use a custom identifier. The
scenario is that I use Metabase to synchronize data between existing
db/php app and a newly created web application. The existing app
cannot be changed, and a table containing user information has a
login filed as the primary key. An id field cannot be added.

Now my question: How can I get Metabase to work with a field login
insted of id?

Here is my config for that class, that still uses id as the primary
key:
<class>
  <id>login</id>
  <name>z_user</name>
  <variable>
    <name>login</name>
    <length>10</length>
    <type>text</type>
  </variable>
  <variable>
    <name>passwort</name>
    <type>text</type>
    <length>255</length>
  </variable>
  <variable>
    <name>email</name>
    <type>text</type>
    <length>50</length>
    <optional>1</optional>
  </variable>
</class>

Regards,
Manfred Schreck


Re: Custom Identifier - how does it work?

by mlemos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

on 03/20/2007 05:32 AM manfred.schreck said the following:

> Hello,
>
> I am using Metabase for a while, and I am happy with it.
> Now I am in a situation, that I have to use a custom identifier. The
> scenario is that I use Metabase to synchronize data between existing
> db/php app and a newly created web application. The existing app
> cannot be changed, and a table containing user information has a
> login filed as the primary key. An id field cannot be added.
>
> Now my question: How can I get Metabase to work with a field login
> insted of id?

I am a bit confused with your references to Metabase.

Do you mean you have an application using Metabase and you want to
integrate with something that uses classes generated by Metastorage?


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Re: Custom Identifier - how does it work?

by manfred.schreck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- In metal-dev@..., Manuel Lemos <mlemos@...> wrote:
>
> Hello,
>
> on 03/20/2007 05:32 AM manfred.schreck said the following:
> > Hello,
> >
> > I am using Metabase for a while, and I am happy with it.
> > Now I am in a situation, that I have to use a custom identifier.
The
> > scenario is that I use Metabase to synchronize data between
existing
> > db/php app and a newly created web application. The existing app
> > cannot be changed, and a table containing user information has a
> > login filed as the primary key. An id field cannot be added.
> >
> > Now my question: How can I get Metabase to work with a field
login
> > insted of id?
>
> I am a bit confused with your references to Metabase.
>
> Do you mean you have an application using Metabase and you want to
> integrate with something that uses classes generated by
Metastorage?

>
>
> --
>
> Regards,
> Manuel Lemos
>
> Metastorage - Data object relational mapping layer generator
> http://www.metastorage.net/
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
Hello Manuel,

sorry I meant Metastorage.

cheers,
Manfred


Re: Re: Custom Identifier - how does it work?

by mlemos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

on 03/21/2007 05:17 AM manfred.schreck said the following:

> --- In metal-dev@..., Manuel Lemos <mlemos@...> wrote:
>> Hello,
>>
>> on 03/20/2007 05:32 AM manfred.schreck said the following:
>>> Hello,
>>>
>>> I am using Metabase for a while, and I am happy with it.
>>> Now I am in a situation, that I have to use a custom identifier.
> The
>>> scenario is that I use Metabase to synchronize data between
> existing
>>> db/php app and a newly created web application. The existing app
>>> cannot be changed, and a table containing user information has a
>>> login filed as the primary key. An id field cannot be added.
>>>
>>> Now my question: How can I get Metabase to work with a field
> login
>>> insted of id?
>> I am a bit confused with your references to Metabase.
>>
>> Do you mean you have an application using Metabase and you want to
>> integrate with something that uses classes generated by
> Metastorage?

> sorry I meant Metastorage.

Currently Metastorage does not support defining custom object identifier
(OID) variables. For now, an implicit OID is assigned to automatic
variable id .

However it is already in my todo list to add support custom OID. Not
only you will be specify another variable as OID, but you also be
allowed to specify more than one OID variable to achieve composite
primary keys. Please be patient.

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
LightInTheBox - Buy quality products at wholesale price