Manuel Lemos | 1 Sep 22:07 2004

Re: Re: unknown error again


Hello,

On 08/30/2004 02:05 PM, pokara93 wrote:
>  hello, I have minimize the causes and the problem is when I try to 
> insert a value of distinct type of the type define to the database, 
> in this case not insert null. The persist function returns the 
> message of sql trouble.Ah! this message is because I was modificated 
> the code in persist function to see the $this->factory->error.
>  I try to send you the code but, i must to change it, because now 
> works right.

I analyzed your component and the persist function of the Empresa class 
and everything seems ok as expected.

So, if you were getting that error, it seems that the contabilidad 
variable of the empresa class is being assigned with some wrong value.

You should be setting it with the setContabilidad function of the 
Empresa class. That function should take an already persisted object of 
the Contabilidad class or a null object.

If you passed a contabilidad object that was not yet persisted, that is 
a bug and the class should return an error (although it does not do that 
now). If the contabilidad object is not persisted, it should store a 
NULL object reference, so it should never get that error.

If you are already doing this, I would need to see your code that leads 
to the error you get.

(Continue reading)

Manuel Lemos | 3 Sep 19:38 2004

Re: XMI to Metastorage XML converter

Hello,

On 08/30/2004 07:41 PM, Peter Howard wrote:
>>>Attached is the XSLT script, a basic XMI file and the resultant
>>>Metastorage XML.
>>>
>>>Feedback (suggestions, criticisms, etc) welcome.
>>
>>I haven't tested it but I suspect since the list is configure to
>>remove 
>>attachements for security (virus) reasons, it it was not you, the list
>>pasted your file at the end of the message.
>>
>>Anyway, it would be useful if you could post it here along with a 
> 
> 
> OK, I'll try posting it inline.  There are 3 sections: 

The files were large. Next time please send them here:

http://groups.yahoo.com/group/metal-dev/files/metastorage/xmi2metastorage/

> - The XSLT script
> - A simple XMI file
> - The resultant output.

The output starts looking like it. There are a few corrections thought. 
The root element of Metastorage component files is component, not 
metastorage. The uid field is actually id now. There are also a few 
OBJECT:Class- values hanging in there that seem to need to be fixed.
(Continue reading)

rola_51 | 8 Sep 17:36 2004
Picon

Updating persistent objects

I started using Metastorage recently, with mySql, and have a couple 
of related questions:
1. one of the fields of my Object was defined with the "unique" 
validation. However, I found that this is not enforced in the db 
schema generated, nor in the persistence code. Did I do something 
wrong?
2. I manually set the field as a unique index, but then I couldnĀ“t 
persist the same object more than once. I found that persisted object 
records are always created as new records in the table; but sometimes 
I need to update the object's member variables. Also, I found that if 
I set the "$factory->pending" to false, I could update the record. 
However, I wonder if this is the proper way to go, especially when 
there are linked objects involved.

Can anyone help? Thanks in advance!

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Manuel Lemos | 8 Sep 18:10 2004

Re: Updating persistent objects

Hello,

On 09/08/2004 12:36 PM, rola_51 wrote:
> I started using Metastorage recently, with mySql, and have a couple 
> of related questions:
> 1. one of the fields of my Object was defined with the "unique" 
> validation. However, I found that this is not enforced in the db 
> schema generated, nor in the persistence code. Did I do something 
> wrong?

You need to define a validate type function in that class and call it 
before calling the persist type function.

The Metastorage tutorial contains more details:

http://www.meta-language.net/metastorage-tutorial.html#17.2.5

http://www.meta-language.net/metastorage-tutorial.html#10.4.8

As for enforcing uniqueness in the database, it could be an idea but not 
  databases support unique constraint checking consistently.

Adding a unique index may serve that purpose of preventing non-unique 
data to be entered but that would happen after the fact that you want to 
prevent lead to a runtime database error.

It would not be a bad idea and would make unique lookups faster using an 
index, but since indexes always consume space that the developer may not 
want to spend, I will add that as an option.

(Continue reading)

pokara93 | 14 Sep 12:40 2004

filter values type


hello,i have a problem with filters and show me this message:

"it was not specified a valid database gettextfieldvalue value 
argument"

it is happend when when I put a integer value to filter in a 
method,is this ok?,I can only use string filter values?

thanks

pokara

(I couldn't see again the other problem with the sql error, sorry)

------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Manuel Lemos | 14 Sep 14:37 2004

Re: filter values type

Hello,

On 09/14/2004 07:40 AM, pokara93 wrote:
> hello,i have a problem with filters and show me this message:
> 
> "it was not specified a valid database gettextfieldvalue value 
> argument"
> 
> it is happend when when I put a integer value to filter in a 
> method,is this ok?,I can only use string filter values?

That sounds like a bug. Can you please send me your filter and involved 
classes so I can reproduce the problem?

--

-- 

Regards,
Manuel Lemos

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

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

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

------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
(Continue reading)

Manuel Lemos | 16 Sep 06:57 2004

Metastorage class variables feature enhancements

A new version of Metastorage was released providing several new features 
that are mostly enhancements of the capabilities of the data object 
class variables.

Most of the implemented enhancements correspond to feature requests, 
some made many months ago.

Full news article
http://www.meta-language.net/news-2004-09-16-metastorage.html

-- 

Regards,
Manuel Lemos

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

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

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

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

(Continue reading)

Peter Howard | 22 Sep 12:43 2004
Picon

Re: XMI to Metastorage XML converter

On Sat, 2004-09-04 at 03:38, Manuel Lemos wrote:

> > OK, I'll try posting it inline.  There are 3 sections: 
> 
> The files were large. Next time please send them here:
> 
> http://groups.yahoo.com/group/metal-dev/files/metastorage/xmi2metastorage/
> 

OK, after a mere 3 weeks I have finally put the files up there.

> > - The XSLT script
> > - A simple XMI file
> > - The resultant output.

  * -- 
    Peter Howard
    pjh <at> coastal.net.au
    Jabber Id: pjhacnau <at> 12jabber.com
    AIM Id: pjhacnau

[Non-text portions of this message have been removed]

------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
(Continue reading)

Manuel Lemos | 23 Sep 20:37 2004

Re: XMI to Metastorage XML converter

Hello,

On 09/22/2004 07:43 AM, Peter Howard wrote:
>>>OK, I'll try posting it inline.  There are 3 sections: 
>>
>>The files were large. Next time please send them here:
>>
>>http://groups.yahoo.com/group/metal-dev/files/metastorage/xmi2metastorage/
>>
> 
> 
> OK, after a mere 3 weeks I have finally put the files up there.

I have just tried it and here follows the list of problems that I found:

- The root tag is generated with a namespace definition as attribute. 
Namespaces should not be necessary here. The XML parser used by 
Metastorage is configured to not accept tag attributes because those are 
not necessary and since they would take more memory to preserve and 
would not be processed the parse complains. Is there a way to suppress 
the namespace attribute?

- Variables are coming out without names. It seems that the XSL is 
picking the wrong XMI attribute.

- Reference variables point to objects of classes. So they should use 
the <class> tag instead of the <type> tag. The type tag is just for 
basic data types. Since the basic data types are fixed they do not need 
an id because they will never be renamed. The reference variables do not 
need an id along with the class. The id should go only with the class 
(Continue reading)

Peter Howard | 24 Sep 00:30 2004
Picon

Re: XMI to Metastorage XML converter

On Fri, 2004-09-24 at 04:37, Manuel Lemos wrote:
> Hello,
> 
> On 09/22/2004 07:43 AM, Peter Howard wrote:
> >>>OK, I'll try posting it inline.  There are 3 sections: 
> >>
> >>The files were large. Next time please send them here:
> >>
> >>http://groups.yahoo.com/group/metal-dev/files/metastorage/xmi2metastorage/
> >>
> > 
> > 
> > OK, after a mere 3 weeks I have finally put the files up there.
> 
> I have just tried it and here follows the list of problems that I
> found:
> 
> - The root tag is generated with a namespace definition as attribute. 
> Namespaces should not be necessary here. The XML parser used by 
> Metastorage is configured to not accept tag attributes because those
> are 
> not necessary and since they would take more memory to preserve and 
> would not be processed the parse complains. Is there a way to suppress
> the namespace attribute?

I am asking that very question myself :-) I'm not asking for it out of
the XSLT; xsltproc is generating it anyway.  I need to work out how to
deal with it.

I'm also trying to work out how to stop the unwanted whitespace
(Continue reading)


Gmane